JPH11122618A - Image coder - Google Patents

Image coder

Info

Publication number
JPH11122618A
JPH11122618A JP28208197A JP28208197A JPH11122618A JP H11122618 A JPH11122618 A JP H11122618A JP 28208197 A JP28208197 A JP 28208197A JP 28208197 A JP28208197 A JP 28208197A JP H11122618 A JPH11122618 A JP H11122618A
Authority
JP
Japan
Prior art keywords
image
motion vector
search
offset
block
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
JP28208197A
Other languages
Japanese (ja)
Inventor
Reiko Sawa
礼子 澤
Takeyoshi Hashimoto
武代志 橋本
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.)
MegaChips Corp
Original Assignee
MegaChips 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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP28208197A priority Critical patent/JPH11122618A/en
Publication of JPH11122618A publication Critical patent/JPH11122618A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To detect a motion vector over a wide range with a simple configuration. SOLUTION: In the case of retrieving a motion vector with respect to a target block 30, an offset 31 is calculated based on a motion vector between a macro block around the target block 30 and a macro block equivalent to the target block 30 of one preceding frame. A 1st layer retrieval is conducted in a range of ±4 pixels around the offset 31. Then a 2nd layer retrieval is conducted within a range of ±2 pixels around a retrieval reference position 33 decided as a macro block minimizing the error function. Similarly a final stage retrieval is conducted within a range of ±1 pixel. In the 1st to 2nd layer retrieval, low pass filter processing is applied to the image and at the final layer, it is relieved.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、MPEG規格にもと
づく画像符号化に好適な、画像符号化装置に関し、特
に、動きベクトルの検出を容易化するための改良に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding apparatus suitable for image coding based on the MPEG standard, and more particularly to an improvement for facilitating detection of a motion vector.

【0002】[0002]

【従来の技術】従来、MPEG規格に代表される動画像の符
号化技術では、フレーム間の局部的な画像の動きの量を
表現する動きベクトルを用いた動き補償を取り入れるこ
とによって、フレーム間の符号化が行われる。それによ
って、動画像の圧縮効率の飛躍的な向上が図られてい
る。
2. Description of the Related Art Conventionally, in a moving image coding technique represented by the MPEG standard, a motion compensation using a motion vector expressing the amount of local image motion between frames has been introduced. Encoding is performed. As a result, the compression efficiency of moving images is dramatically improved.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
画像符号化技術では、動きベクトルの検出を行うのに、
複雑な計算が必要であり、そのための装置の構成も複雑
とならざるを得ないという問題点があった。しかも、動
きベクトルを、画像の中の広い範囲にわたって探索する
ことが容易ではないという問題点があった。
However, in the conventional image coding technique, when detecting a motion vector,
There is a problem that complicated calculation is required, and the configuration of the device for that purpose must be complicated. Moreover, there is a problem that it is not easy to search for a motion vector over a wide range in an image.

【0004】この発明は、従来の画像符号化技術におけ
る上記した問題点を解消するためになされたもので、動
きベクトルの検出を簡単な構成で実現し、しかも、広い
範囲にわたる動きベクトルの探索を容易化する画像符号
化装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems in the conventional image coding technology, and realizes detection of a motion vector with a simple configuration, and furthermore, searches for a motion vector over a wide range. It is an object of the present invention to provide an image encoding device that facilitates image encoding.

【0005】[0005]

【課題を解決するための手段】第1の発明の装置では、
動きベクトルを用いた動き補償を取り入れたフレーム間
符号化を実現する画像符号化装置において、カレント画
像と参照画像とを比較して前記動きベクトルを決定する
際に、広い画像領域から狭い画像領域へと段階的に、複
数階層にわたって前記動きベクトルの検索が行われ、し
かも、最初の階層を含む初期の階層では前記カレント画
像と前記参照画像とにローパスフィルタ処理を施した上
で、前記探索が行われ、少なくとも最終の階層では、前
記ローパスフィルタ処理を解除した上で、前記検索が行
われる。
According to a first aspect of the present invention, there is provided an apparatus comprising:
In an image encoding apparatus that realizes inter-frame encoding that incorporates motion compensation using a motion vector, when determining a motion vector by comparing a current image with a reference image, a wide image area is narrowed to a narrow image area. Step by step, the search for the motion vector is performed over a plurality of layers, and in the initial layer including the first layer, the current image and the reference image are subjected to low-pass filter processing, and then the search is performed. At least in the last layer, the search is performed after the low-pass filter processing is canceled.

【0006】第2の発明の装置では、動きベクトルを用
いた動き補償を取り入れたフレーム間符号化を実現する
画像符号化装置において、カレント画像と参照画像とを
比較して前記動きベクトルを決定する際に、広い画像領
域から狭い画像領域へと段階的に、複数階層にわたって
前記動きベクトルの検索が行われる。しかも、最初の階
層の検索に先だって、初期検索位置としてのオフセット
が算出され、前記最初の階層の検索では、前記オフセッ
トを中心として前記探索が行われ、前記オフセットは、
前記カレント画像の前記動きベクトルの算出の対象とさ
れるブロックであるターゲットブロックの周囲に位置
し、すでに前記動きベクトルが算出されている3個のブ
ロックの動きベクトルと、前記ターゲットブロックに対
応する前記参照画像の中のブロックにおける動きベクト
ルとにもとづいて、決定される。
According to a second aspect of the present invention, there is provided an image encoding apparatus for implementing inter-frame encoding incorporating motion compensation using a motion vector, wherein the motion vector is determined by comparing a current image with a reference image. At this time, the search for the motion vector is performed in a plurality of hierarchies stepwise from a wide image area to a narrow image area. Moreover, prior to the search of the first hierarchy, an offset as an initial search position is calculated, and in the search of the first hierarchy, the search is performed around the offset, and the offset is
The motion vectors of three blocks which are located around a target block which is a block for which the motion vector of the current image is to be calculated and whose motion vectors are already calculated, and the motion vectors corresponding to the target block. The determination is made based on the motion vector in the block in the reference image.

【0007】[0007]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

<1.装置の全体構成>図1は、実施の形態の画像符号化
装置の構成を示すブロック図である。後述するように、
本発明は、動きベクトルを算出する装置部分(図1で
は、動きベクトル検出部14)に、主要な特徴を有して
いる。したがって、図1には、広く知られるMPEG規格に
もとづいて画像信号の符号化を実行する装置を例示する
が、本発明は、動きベクトルを用いた動き補償を取り入
れてフレーム間符号化を行う画像符号化装置一般に対し
て、適用可能である。
<1. Overall Configuration of Apparatus> FIG. 1 is a block diagram showing the configuration of an image coding apparatus according to an embodiment. As described below,
The present invention has a main feature in a device for calculating a motion vector (in FIG. 1, the motion vector detecting unit 14). Therefore, FIG. 1 illustrates an apparatus that performs encoding of an image signal based on the widely known MPEG standard. However, the present invention employs an image encoding apparatus that performs inter-frame encoding by incorporating motion compensation using a motion vector. The present invention is applicable to encoding devices in general.

【0008】はじめに、動きベクトル検出部14の構成
の前提となる周辺部を含めて、図1の装置の全体構成の
概略について説明する。図1に示すように、カラーカメ
ラなどの画像入力部1は、撮像された画像を表現する画
像信号を、デジタル信号の形式で出力する。なお、本明
細書では、説明の無用な複雑化を避けるために、混同の
おそれのない範囲で、画像を表現する画像信号と、画像
そのものとを、等しく「画像」と表現する。
First, an outline of the overall configuration of the apparatus shown in FIG. 1 will be described, including a peripheral portion which is a premise of the configuration of the motion vector detecting section 14. As shown in FIG. 1, an image input unit 1 such as a color camera outputs an image signal representing a captured image in the form of a digital signal. In this specification, in order to avoid unnecessary complication of the description, an image signal representing an image and an image itself are equally represented as an "image" within a range where there is no possibility of confusion.

【0009】画像入力部1から出力される画像は、フレ
ーム単位でフレームメモリ2に一時的に記憶される。そ
の後、フレームメモリ読出部3によって、フレームメモ
リ2から、フレームごとに一定の順序で画像が読み出さ
れ、カレント画像22として差分回路4および切換部5
へと入力される。
An image output from the image input unit 1 is temporarily stored in a frame memory 2 on a frame basis. Thereafter, an image is read out from the frame memory 2 in a fixed order for each frame by the frame memory reading unit 3, and the difference circuit 4 and the switching unit 5
Is entered.

【0010】差分回路4は、フレームメモリ読出部3か
ら送られたカレント画像22と、予測メモリ11から送
られる予測画像12との間で、画素値の差分を演算す
る。切換部5は、差分回路4から出力される差分画像2
3と、フレームメモリ読出部3からのカレント画像22
と間で、いずれかを選択して出力する。切換部5が出力
する信号は、変換部6へと入力される。
The difference circuit 4 calculates a difference between pixel values between the current image 22 sent from the frame memory reading unit 3 and the predicted image 12 sent from the prediction memory 11. The switching unit 5 outputs the difference image 2 output from the difference circuit 4.
3 and the current image 22 from the frame memory reading unit 3
Select and output one between The signal output from the switching unit 5 is input to the conversion unit 6.

【0011】変換部6では、いわゆる離散コサイン変換
(DCT)が実行される。この離散コサイン変換では、
例えば8×8画素で構成されるブロックごとに、入力さ
れた画像が、ブロックを構成する画素の数と同数(例え
ば、8×8=64個)の空間周波数成分(DCT係数)
の組へと変換される。変換によって得られたDCT係数
は、量子化部7へと入力される。
The transform unit 6 executes a so-called discrete cosine transform (DCT). In this discrete cosine transform,
For example, for each block composed of 8 × 8 pixels, the input image has the same number (for example, 8 × 8 = 64) of spatial frequency components (DCT coefficients) as the number of pixels constituting the block.
Is converted to the set The DCT coefficients obtained by the transform are input to the quantization unit 7.

【0012】量子化部7では、その内部に備わる量子化
テーブルに規定される係数値の組、および、符号化パラ
メータ制御部19から送出される量子化ステップ指示信
号25を参照して、各DCT係数ごとに量子化が施され
る。すなわち、DCT係数が量子化係数へと変換され
る。量子化ステップ指示信号25は、量子化テーブルに
規定される係数値の組に対して、一律に共通の倍率を付
与することによって、量子化テーブルにもとづく量子化
の幅、すなわち量子化ステップを、すべてのDCT係数
に共通の倍率で補正する。量子化ステップが小さいほ
ど、画質の劣化は抑えられるが、信号量は多くなる。
The quantization unit 7 refers to a set of coefficient values defined in a quantization table provided therein and a quantization step instruction signal 25 sent from the coding parameter control unit 19 to obtain each DCT. Quantization is performed for each coefficient. That is, the DCT coefficients are converted into quantization coefficients. The quantization step instructing signal 25 gives the width of the quantization based on the quantization table, that is, the quantization step, by uniformly assigning a common scaling factor to the set of coefficient values defined in the quantization table. Correction is performed with a magnification common to all DCT coefficients. As the quantization step is smaller, the deterioration of the image quality is suppressed, but the signal amount is larger.

【0013】量子化部7で得られた量子化係数は、可変
長符号化部(VLC)15へと入力されると同時に、逆
量子化部8へと入力される。逆量子化部8では、量子化
部7とは逆の演算が実行される。したがって、量子化さ
れる以前のDCT係数と同一形式の信号が得られる。
The quantized coefficients obtained by the quantization unit 7 are input to a variable length coding unit (VLC) 15 and simultaneously to an inverse quantization unit 8. In the inverse quantization unit 8, an operation opposite to that of the quantization unit 7 is performed. Therefore, a signal of the same format as the DCT coefficient before quantization is obtained.

【0014】ただし、量子化部7における処理は、一般
に非可逆であるため、逆量子化部8で再構成されたDC
T係数は、変換部6から出力されるDCT係数と、一般
には同一ではない。すなわち、逆量子化部8の出力に
は、量子化部7の処理によって生じる量子化誤差が一般
に含まれる。いうまでもなく、量子化ステップが小さい
ほど、量子化誤差は小さくなる。
However, since the processing in the quantization unit 7 is generally irreversible, the DC reconstructed by the inverse quantization unit 8
The T coefficient is generally not the same as the DCT coefficient output from the transform unit 6. That is, the output of the inverse quantization unit 8 generally includes a quantization error generated by the processing of the quantization unit 7. It goes without saying that the smaller the quantization step, the smaller the quantization error.

【0015】逆量子化部8で得られたDCT係数は、逆
変換部9へと入力される。逆変換部9では、DCTとは
逆の演算(逆DCT)が実行される。その結果、変換部
6でDCT変換が施される前の画像信号と同一形式の画
像信号が得られる。この画像信号も、いうまでもなく、
一般には変換部6へ入力された画像信号と同一ではな
く、量子化誤差を含んでいる。
The DCT coefficients obtained by the inverse quantization section 8 are input to an inverse transform section 9. In the inverse transform unit 9, an operation opposite to the DCT (inverse DCT) is executed. As a result, an image signal in the same format as the image signal before DCT conversion is performed by the conversion unit 6 is obtained. This image signal, needless to say,
Generally, it is not the same as the image signal input to the conversion unit 6, but includes a quantization error.

【0016】再構成された画像信号は、参照画像13と
して、予測メモリ11へとフレーム単位で格納される。
予測メモリ11に格納される参照画像13は、動きベク
トル検出部14へと入力される。フレームメモリ読出部
3から読み出されたカレント画像22は、動きベクトル
検出部14へも同時に入力される。動きベクトル検出部
14は、マクロブロック単位で、このカレント画像22
にもっとも近い参照画像13の部分を探索する。探索さ
れた部分は、予測画像と称される。
The reconstructed image signal is stored as a reference image 13 in the prediction memory 11 on a frame basis.
The reference image 13 stored in the prediction memory 11 is input to the motion vector detection unit 14. The current image 22 read from the frame memory reading unit 3 is also input to the motion vector detection unit 14 at the same time. The motion vector detection unit 14 determines the current image 22
Is searched for the portion of the reference image 13 closest to. The searched portion is called a predicted image.

【0017】動きベクトル検出部14は、さらに、予測
画像からこれに対応するカレント画像22の上のマクロ
ブロックまでの変位を表現するベクトルを、動きベクト
ル24として、予測メモリ11、および、可変長符号化
部15へと送出する。予測メモリ11は、動きベクトル
24にもとづいて、マクロブロックごとに参照画像13
の中から予測画像12を抽出して、差分回路4へと送出
する。
The motion vector detecting section 14 further uses a vector representing the displacement from the predicted image to the corresponding macroblock on the current image 22 as a motion vector 24 as a prediction memory 11 and a variable length code. To the conversion unit 15. The prediction memory 11 stores the reference image 13 for each macroblock based on the motion vector 24.
, And sends the predicted image 12 to the difference circuit 4.

【0018】ここで、マクロブロックとは、動きベクト
ル24が定義される画像の単位であり、例えば、輝度信
号に対しては16×16画素、色差信号に対しては8×
8画素で構成される。輝度信号に対して16×16画素
でマクロブロックが定義される場合には、この輝度信号
に対しては、例えば、1つのマクロブロックが4分割さ
れてなる8×8画素で構成されるブロックを単位とし
て、変換部6におけるDCT変換処理、および、量子化
部7における量子化処理が施される。切換部5は、図示
しない制御部に接続されており、カレント画像22およ
び差分画像23とを、マクロブロック単位で比較し、画
素値の小さい方、言い換えると信号量の少ない方を選択
する。
Here, a macroblock is a unit of an image in which the motion vector 24 is defined. For example, 16 × 16 pixels for a luminance signal and 8 × 16 pixels for a color difference signal.
It is composed of eight pixels. When a macroblock is defined by 16 × 16 pixels with respect to a luminance signal, for example, a block composed of 8 × 8 pixels obtained by dividing one macroblock into four is used for the luminance signal. As a unit, DCT conversion processing in the conversion unit 6 and quantization processing in the quantization unit 7 are performed. The switching unit 5 is connected to a control unit (not shown), compares the current image 22 and the difference image 23 in macroblock units, and selects a smaller pixel value, in other words, a smaller signal amount.

【0019】量子化部7に後続する可変長符号化部15
では、入力される量子化係数に対して、例えばハフマン
符号化などの可変長符号化処理が実行されると同時に、
動きベクトル検出部14から送出される動きベクトル2
4が付加され、その結果、符号化信号が得られる。得ら
れた符号化信号は、つづく多重化部16で多重化処理を
施された上で、送信バッファ17に一旦蓄積される。
The variable length coding unit 15 following the quantization unit 7
At the same time, the input quantized coefficient is subjected to variable-length encoding processing such as Huffman encoding, for example.
Motion vector 2 sent from motion vector detecting section 14
4 is added, and as a result, an encoded signal is obtained. The obtained coded signal is multiplexed by a multiplexing unit 16 and then temporarily stored in a transmission buffer 17.

【0020】送信バッファ17に蓄積された符号化信号
は、適時、送信経路18へと送出される。送信バッファ
17からは、その状態、すなわち、バッファがオーバフ
ローである、あるいは、空であることを通知するステー
タス信号が、符号化パラメータ制御部19へと送出され
る。符号化信号には動きベクトル24が含まれているた
め、符号化信号を受信し、カレント画像22を再構成す
る復号化装置において、動きベクトル24を考慮した復
号化が可能となる。
The coded signal stored in the transmission buffer 17 is transmitted to the transmission path 18 as appropriate. From the transmission buffer 17, a status signal notifying that state, that is, the buffer is overflowing or empty, is sent to the encoding parameter control unit 19. Since the coded signal includes the motion vector 24, a decoding device that receives the coded signal and reconstructs the current image 22 can perform decoding in consideration of the motion vector 24.

【0021】<2.動きベクトル検出部>つぎに、本発明
の特徴部をなす動きベクトル検出部14について説明す
る。図2は、動きベクトル検出部14の動作の流れを示
すフローチャートである。動きベクトル検出部14は、
プログラムを搭載したメモリとそのプログラムに従って
動作するコンピュータとを備えることによって、図2の
動作を実現することが可能である。動きベクトル検出部
14は、また、プログラムによらずに、集積回路を含む
ハードウェハのみで構成することも可能である。
<2. Motion Vector Detector> Next, the motion vector detector 14 which is a feature of the present invention will be described. FIG. 2 is a flowchart showing a flow of the operation of the motion vector detection unit 14. The motion vector detection unit 14
The operation in FIG. 2 can be realized by including a memory in which a program is mounted and a computer that operates according to the program. The motion vector detection unit 14 can also be configured only with a hardware wafer including an integrated circuit without using a program.

【0022】図2に示すように、動きベクトルの検出、
すなわち、動き予測が開始されると、まずステップS1
において、カレント画像22および参照画像13の双方
に対して、ローパスフィルタがかけられる。すなわち、
ローパスフィルタ特性をもったフィルタリング処理が施
される。この処理は、例えば数1に示すように、隣接す
る4×4(=16)画素の値の平均値を算出することに
よって遂行される。
As shown in FIG. 2, detection of a motion vector,
That is, when the motion prediction is started, first, in step S1
In, a low-pass filter is applied to both the current image 22 and the reference image 13. That is,
A filtering process having a low-pass filter characteristic is performed. This process is performed by calculating an average value of adjacent 4 × 4 (= 16) pixels as shown in Equation 1, for example.

【0023】[0023]

【数1】 (Equation 1)

【0024】つぎに、ステップS2において、カレント
画像22の中のブロックごとに、オフセットすなわち初
期探索基準位置が算出される。オフセットは、図3に示
すように、カレント画像22の中のオフセット算出の対
象とされるブロック、すなわちターゲットブロックTB
に対して、すでに動きベクトルが算出された周囲の3ブ
ロックと、ターゲットブロックTBに対応する参照画像
13の中のブロックとの、合計4ブロックにおける動き
ベクトルにもとづいて算出される。
Next, in step S2, an offset, that is, an initial search reference position is calculated for each block in the current image 22. As shown in FIG. 3, the offset is a block in the current image 22 for which the offset is to be calculated, that is, the target block TB.
Is calculated based on the motion vectors in a total of four blocks, that is, three surrounding blocks for which the motion vectors have already been calculated and blocks in the reference image 13 corresponding to the target block TB.

【0025】より具体的には、図3に示すように、ター
ゲットブロックTBの周囲3ブロックの動きベクトルM
V1〜MV3、および、ターゲットブロックTBに対応
する参照画像13の中のブロックの動きベクトルMV4
を、数2に代入することによって、ターゲットブロック
TBに対するオフセットoffsetが算出される。
More specifically, as shown in FIG. 3, the motion vectors M of three blocks around the target block TB are obtained.
V1 to MV3 and a motion vector MV4 of a block in the reference image 13 corresponding to the target block TB.
Is substituted into Equation 2 to calculate an offset with respect to the target block TB.

【0026】[0026]

【数2】 (Equation 2)

【0027】ここで、符号median は、中央値を意味す
る。すなわち、オフセットは、動きベクトルMV1〜M
V3の中央値と、動きベクトルMV4との平均値として
算出される。
Here, the code median means a median value. That is, the offsets are the motion vectors MV1 to MV
It is calculated as the average value of the median value of V3 and the motion vector MV4.

【0028】なお、ターゲットブロックTBがカレント
画像22の端部に位置するときには、例外処理として、
数3にもとづいて、オフセットが算出される。
When the target block TB is located at the end of the current image 22, as an exception process,
The offset is calculated based on Equation 3.

【0029】[0029]

【数3】 (Equation 3)

【0030】また、イントラモードであるために、動き
ベクトルMV1〜MV4が存在しないときには、例え
ば、MV=(0,0)とする。あるいは、イントラモー
ドにおいても、とりあえず、動きベクトルMVを算出し
ておいて、それを用いるなどの方法が採り得る。ただ
し、ターゲットブロックTBに対応する参照画像13の
中のブロックが、イントラモードであったときには、オ
フセットは数4にもとづいて算出される。
When there is no motion vector MV1 to MV4 due to the intra mode, for example, MV = (0, 0). Alternatively, even in the intra mode, a method of calculating the motion vector MV and using the calculated motion vector MV may be employed. However, when the block in the reference image 13 corresponding to the target block TB is in the intra mode, the offset is calculated based on Expression 4.

【0031】[0031]

【数4】 (Equation 4)

【0032】図2に戻って、つづくステップS3におい
て、3階層(3ステップ)探索が開始される。3階層探
索は、ステップS3〜S7を3回繰り返し実行すること
によって、遂行される。図4は、3回にわたるステップ
S3〜S7のループを通じて行われる3階層探索を説明
する動作説明図である。
Returning to FIG. 2, in the following step S3, a three-layer (three-step) search is started. The three-level search is performed by repeatedly executing steps S3 to S7 three times. FIG. 4 is an operation explanatory diagram illustrating a three-level search performed through a loop of steps S3 to S7 over three times.

【0033】図4(a)〜(c)の中に描かれるマトリ
クス状に配列する小領域の一つ一つが、一つのマクロブ
ロックを代表する画素に対応する。マクロブロックとそ
れを代表する画素との関係は、図4(a)を拡大した図
5に詳細に示される。図5において、矩形の小領域の一
つ一つが、一つの画素を表しており、一つのマクロブロ
ック31,32は、それぞれ、16×16個の画素で構
成されている。
Each of the small areas arranged in the form of a matrix shown in FIGS. 4A to 4C corresponds to a pixel representing one macroblock. The relationship between macroblocks and the pixels that represent them is shown in detail in FIG. In FIG. 5, each of the rectangular small areas represents one pixel, and each of the macroblocks 31 and 32 is composed of 16 × 16 pixels.

【0034】図4に戻って、第1回目のループでは、図
4(a)に示すように、ステップS3に後続するステッ
プS4において、ターゲットブロック30に対して、ス
テップS2で算出されたオフセット31に対応する探索
基準位置32が決定される。つづくステップS5では、
探索基準位置32から4画素ずつ離れた9個のマクロブ
ロックのそれぞれに対して、誤差関数の値が算出され
る。誤差関数は、図6に示すように、カレント画像22
と参照画像13の間で、対応するマクロブロック内の画
素値(例えば、輝度成分)の差を、1画素おきに算出
し、それらの絶対値和をとったものである。
Returning to FIG. 4, in the first loop, as shown in FIG. 4A, in step S4 following step S3, the offset 31 calculated in step S2 is applied to the target block 30. Is determined. In the following step S5,
An error function value is calculated for each of the nine macroblocks separated by four pixels from the search reference position 32. The error function is, as shown in FIG.
The difference between the pixel value (for example, luminance component) in the corresponding macroblock between the reference image 13 and the reference image 13 is calculated every other pixel, and the sum of the absolute values is calculated.

【0035】図6において、黒く塗りつぶされた矩形領
域が画素値の差を算出する対象とされる画素を表し、白
抜きの矩形領域が算出の対象とされない画素を表してい
る。この算出の手順を数式で表現すると、数5に示すと
おりとなる。
In FIG. 6, a black rectangular area indicates a pixel whose difference in pixel value is to be calculated, and a white rectangular area indicates a pixel which is not to be calculated. When the calculation procedure is expressed by a mathematical expression, it is as shown in Expression 5.

【0036】[0036]

【数5】 (Equation 5)

【0037】ここで、関数fが誤差関数を表している。Here, the function f represents an error function.

【0038】図2に戻って、つづくステップS6では、
9個のマクロブロックの誤差関数が互いに比較され、誤
差関数が最小となるマクロブロックが、つぎの探索階層
の探索基準位置とされる。図4(a)の例では、ブロッ
ク33がつぎの探索基準位置として決定される。
Returning to FIG. 2, in the following step S6,
The error functions of the nine macroblocks are compared with each other, and the macroblock with the minimum error function is set as the search reference position of the next search hierarchy. In the example of FIG. 4A, the block 33 is determined as the next search reference position.

【0039】図2に戻って、つづくステップS7に達す
ると、処理はステップS3へと戻る。その後、図4
(b)に例示するように、ステップS4〜S6に沿っ
て、新たな探索基準位置33を中心とした±2画素の範
囲の探索が行われる。その結果、例えば図4(b)に示
すように、誤差関数が最小となるブロック34が、つぎ
の探索階層の探索基準位置として決定される。以上の±
4画素の探索および±2画素の探索では、カレント画像
22および参照画像13の双方にローパスフィルタをか
けた状態で探索が行われる。
Referring back to FIG. 2, when the process reaches step S7, the process returns to step S3. Then, FIG.
As illustrated in (b), a search within a range of ± 2 pixels around the new search reference position 33 is performed along steps S4 to S6. As a result, for example, as shown in FIG. 4B, the block 34 having the minimum error function is determined as a search reference position of the next search hierarchy. ±
In the search for four pixels and the search for ± 2 pixels, the search is performed with a low-pass filter applied to both the current image 22 and the reference image 13.

【0040】つぎの探索基準位置34が決定されると、
再びステップS4〜S6に沿った探索が行われる。この
とき、図4(c)に例示するように、新たな探索基準位
置34中心とした±1画素の範囲で探索が行われる。そ
の結果、例えば図4(c)に示すように、誤差関数が最
小となるブロック35が、新たな探索基準位置として決
定される。この第3階層の探索、すなわち、±1画素の
探索では、カレント画像22および参照画像13の双方
に対して、ローパスフィルタを解除した状態で探索が行
われる。
When the next search reference position 34 is determined,
The search along steps S4 to S6 is performed again. At this time, as illustrated in FIG. 4C, the search is performed within a range of ± 1 pixel from the center of the new search reference position 34. As a result, for example, as shown in FIG. 4C, the block 35 having the minimum error function is determined as a new search reference position. In the search of the third hierarchy, that is, the search for ± 1 pixel, the search is performed on both the current image 22 and the reference image 13 with the low-pass filter removed.

【0041】3階層の探索を通じて得られた最終の探索
基準位置35をそのまま用いて、動きベクトル24の位
置を定めることも可能であるが、望ましくは、図2のス
テップS7に後続するステップS8〜S11を通じて、
動きベクトル24の精度を高める処理が行われる。すな
わち、ステップS8では、カレント画像22および参照
画像13のそれぞれについて、探索基準位置35に対応
するマクロブロックおよびその周囲±1画素の範囲に位
置するマクロブロックに対して、半画素値の算出が行わ
れる。
Although it is possible to determine the position of the motion vector 24 by using the final search reference position 35 obtained through the search of the three layers as it is, it is preferable that the steps S8 to S8 following the step S7 in FIG. Through S11,
Processing for increasing the accuracy of the motion vector 24 is performed. That is, in step S8, for each of the current image 22 and the reference image 13, a half-pixel value is calculated for the macroblock corresponding to the search reference position 35 and the macroblocks located within ± 1 pixel around the macroblock. Will be

【0042】つづく、ステップS9では、最終の探索基
準位置35を中心として、±1/2画素の範囲で探索が
行われる。つぎに、ステップS10において、9個の誤
差関数の中で、最小の値を与えるマクロブロックの位置
にもとづいて、動きベクトル24を定める。すなわち、
ターゲットブロック30を起点とし、誤差関数を最小に
するマクロブロックを終点とするベクトルとして動きベ
クトル24を定める。以上の処理を通じて、動きベクト
ル24が半画素の精度で定められる。
Subsequently, in step S9, a search is performed within a range of ± 1/2 pixel around the final search reference position 35. Next, in step S10, the motion vector 24 is determined based on the position of the macroblock giving the minimum value among the nine error functions. That is,
The motion vector 24 is determined as a vector starting from the target block 30 and ending at a macroblock that minimizes the error function. Through the above processing, the motion vector 24 is determined with half-pixel accuracy.

【0043】<3.装置の利点>図1に示した画像符号化
装置は、以上のように構成され、動作するので、以下の
ような利点を有する。まず、カレント画像22と参照画
像13とにローパスフィルタがかけられた上で、探索が
行われるので、局所的な誤差最小点を、誤って探索基準
位置として決定することを防ぐことができる。また、3
階層の探索の中で、初期段階の第1および第2階層の探
索においてのみ、ローパスフィルタをかけた画像に対し
て探索が行われ、最終の第3階層の探索では、ローパス
フィルタが解除される。このため、探索回数を少なく抑
えつつ、しかも、探索精度を高めることが可能である。
さらに、フィルタリングの負荷も軽減される。
<3. Advantages of Apparatus> The image encoding apparatus shown in FIG. 1 is configured and operates as described above, and thus has the following advantages. First, since a search is performed after the current image 22 and the reference image 13 have been subjected to a low-pass filter, it is possible to prevent a local error minimum point from being erroneously determined as a search reference position. Also, 3
In the search of the hierarchy, the search is performed on the image to which the low-pass filter has been applied only in the search of the first and second layers in the initial stage, and the low-pass filter is released in the search of the final third hierarchy. . Therefore, it is possible to increase the search accuracy while suppressing the number of searches.
Further, the load of filtering is reduced.

【0044】また、1フレームの画像の中での空間的相
関、および、フレーム間の画像の時間的相関が強いこと
に着目して、オフセットが、カレント画像22の3個の
マクロブロックと、参照画像13の一つのマクロブロッ
クの動きベクトルにもとづいて定められる。このため、
動きの速度やフレームレートの変動に由来するフレーム
間の画像の相関の変動の影響を排除して、安定して、か
つ精度よくオフセットが定められる。
Focusing on the fact that the spatial correlation in the image of one frame and the temporal correlation of the image between frames are strong, the offset is determined by the three macroblocks of the current image 22 and the reference. It is determined based on the motion vector of one macroblock of the image 13. For this reason,
The offset is determined stably and accurately by excluding the influence of the fluctuation of the image correlation between frames resulting from the fluctuation of the movement speed and the frame rate.

【0045】また、オフセットが3個のマクロブロック
の動きベクトルの平均値ではなく、中央値にもとづいて
定められる。このため、オフセットが、実際の動きに対
応した適切な値として得られる。
The offset is determined not based on the average value of the motion vectors of the three macroblocks but on the median value. Therefore, the offset is obtained as an appropriate value corresponding to the actual movement.

【0046】さらに、オフセットが用いられるので、±
8画素の探索を行うことなく、±4、±2、±1画素の
3階層の探索のみで、[-16,+15.5]画素の探索領域
で、動きベクトル24の位置を探索することが可能とな
っている。±8画素の探索が必要とされないので、探索
回数が低減され、検出の速度が高められる。このこと
は、動きベクトル検出部14が、より簡単に構成される
ことをも意味する。すなわち、動きベクトル24の検出
が、簡単な構成で、しかも、広い検索領域にわたって行
われ得る。
Further, since an offset is used, ±
It is possible to search the position of the motion vector 24 in the search area of [-16, +15.5] pixels only by searching in three layers of ± 4, ± 2, ± 1 pixels without searching for 8 pixels. It has become. Since searching for ± 8 pixels is not required, the number of searches is reduced and the speed of detection is increased. This also means that the motion vector detection unit 14 is configured more easily. That is, the detection of the motion vector 24 can be performed with a simple configuration and over a wide search area.

【0047】また、誤差関数の算出において、画素値の
差分の計算が1画素おきに行われるので、全画素にわた
って計算が行われる場合に比べて、最終的に決定される
探索基準位置35の位置の精度をほとんど劣化させるこ
となく、演算速度および演算コストが1/4に節減され
る。
In the calculation of the error function, the difference between the pixel values is calculated every other pixel, so that the position of the search reference position 35 which is finally determined is compared with the case where the calculation is performed over all the pixels. The operation speed and the operation cost are reduced to 1/4 with almost no deterioration in the accuracy of the operation.

【0048】[0048]

【発明の効果】第1の発明の装置では、初期の階層にお
ける動きベクトルの検索では、カレント画像と参照画像
とにローパスフィルタ処理を施した上で、探索が行わ
れ、少なくとも最終の階層では、ローパスフィルタ処理
を解除した上で、検索が行われる。このため、局所的な
誤差最小点を、誤って探索基準位置として決定すること
を防ぎつつ、しかも、探索回数を少なく抑えて、探索精
度を高めることが可能となる。また、フィルタリングの
負荷も軽減される。
In the apparatus according to the first aspect of the present invention, in the search for the motion vector in the initial hierarchy, the current image and the reference image are subjected to low-pass filtering, and then the search is performed. The search is performed after the low-pass filter processing is canceled. For this reason, it is possible to prevent the local minimum error point from being erroneously determined as the search reference position, and to suppress the number of searches to a small value, thereby improving the search accuracy. Also, the load of filtering is reduced.

【0049】第2の発明の装置では、最初の階層におけ
る動きベクトルの検索では、オフセットを中心として探
索が行われ、オフセットは、カレント画像と参照画像に
おける動きベクトルにもとづいて決定される。このた
め、動きの速度やフレームレートの変動に由来するフレ
ーム間の画像の相関の変動の影響を排除して、安定的に
高い精度で、動きベクトルが決定される。
In the apparatus according to the second aspect of the present invention, in the search for the motion vector in the first layer, the search is performed centering on the offset, and the offset is determined based on the motion vectors in the current image and the reference image. For this reason, the influence of the fluctuation of the correlation of the images between frames resulting from the fluctuation of the motion speed and the frame rate is excluded, and the motion vector is determined stably with high accuracy.

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

【図1】 実施の形態の画像符号化装置のブロック図で
ある。
FIG. 1 is a block diagram of an image encoding device according to an embodiment.

【図2】 図1の動きベクトル検出部の動作を示す流れ
図である。
FIG. 2 is a flowchart showing an operation of a motion vector detection unit in FIG. 1;

【図3】 図2のステップS2の動作説明図である。FIG. 3 is an operation explanatory diagram of step S2 in FIG. 2;

【図4】 図2のステップS3〜S7の動作説明図であ
る。
FIG. 4 is an operation explanatory diagram of steps S3 to S7 in FIG. 2;

【図5】 図4(a)の一部拡大図である。FIG. 5 is a partially enlarged view of FIG.

【図6】 図2のステップS5の動作説明図である。FIG. 6 is an operation explanatory diagram of step S5 in FIG. 2;

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

13 参照画像 14 動きベクトル検出部 22 カレント画像 13 Reference image 14 Motion vector detection unit 22 Current image

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 動きベクトルを用いた動き補償を取り入
れたフレーム間符号化を実現する画像符号化装置におい
て、 カレント画像と参照画像とを比較して前記動きベクトル
を決定する際に、広い画像領域から狭い画像領域へと段
階的に、複数階層にわたって前記動きベクトルの検索が
行われ、 しかも、最初の階層を含む初期の階層では前記カレント
画像と前記参照画像とにローパスフィルタ処理を施した
上で、前記探索が行われ、少なくとも最終の階層では、
前記ローパスフィルタ処理を解除した上で、前記検索が
行われることを特徴とする画像符号化装置。
1. An image encoding apparatus for implementing inter-frame encoding incorporating motion compensation using a motion vector, comprising: determining a motion vector by comparing a current image with a reference image; The search for the motion vector is performed stepwise from a plurality of layers to a narrow image area, and the current image and the reference image are subjected to low-pass filter processing in the initial layers including the first layer. , The search is performed and at least in the final hierarchy:
An image coding apparatus, wherein the search is performed after the low-pass filter processing is canceled.
【請求項2】 動きベクトルを用いた動き補償を取り入
れたフレーム間符号化を実現する画像符号化装置におい
て、 カレント画像と参照画像とを比較して前記動きベクトル
を決定する際に、広い画像領域から狭い画像領域へと段
階的に、複数階層にわたって前記動きベクトルの検索が
行われ、 しかも、最初の階層の検索に先だって、初期検索位置と
してのオフセットが算出され、前記最初の階層の検索で
は、前記オフセットを中心として前記探索が行われ、 前記オフセットは、前記カレント画像の前記動きベクト
ルの算出の対象とされるブロックであるターゲットブロ
ックの周囲に位置し、すでに前記動きベクトルが算出さ
れている3個のブロックの動きベクトルと、前記ターゲ
ットブロックに対応する前記参照画像の中のブロックに
おける動きベクトルとにもとづいて、決定されることを
特徴とする画像符号化装置。
2. An image coding apparatus which realizes inter-frame coding incorporating motion compensation using a motion vector, wherein a large image area is determined when a current image is compared with a reference image to determine the motion vector. The search for the motion vector is performed over a plurality of hierarchies in stages from a narrower image area to a narrower image area.Moreover, prior to the search for the first hierarchy, an offset as an initial search position is calculated, and in the search for the first hierarchy, The search is performed around the offset, and the offset is located around a target block which is a block for which the motion vector of the current image is to be calculated, and the motion vector has already been calculated. Motion vectors of the blocks and a block in the reference image corresponding to the target block. An image coding apparatus characterized in that it is determined based on a motion vector.
JP28208197A 1997-10-15 1997-10-15 Image coder Pending JPH11122618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28208197A JPH11122618A (en) 1997-10-15 1997-10-15 Image coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28208197A JPH11122618A (en) 1997-10-15 1997-10-15 Image coder

Publications (1)

Publication Number Publication Date
JPH11122618A true JPH11122618A (en) 1999-04-30

Family

ID=17647886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28208197A Pending JPH11122618A (en) 1997-10-15 1997-10-15 Image coder

Country Status (1)

Country Link
JP (1) JPH11122618A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100377240B1 (en) * 2000-02-22 2003-03-28 김태원 Method of compressing and restoring data for moving pictures
US7151799B2 (en) 2002-03-14 2006-12-19 Kddi Corporation Transcoder for coded video
JP2007135036A (en) * 2005-11-11 2007-05-31 Kddi Corp Motion vector detection method and moving image encoder
JP2008510359A (en) * 2004-08-13 2008-04-03 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Panorama motion estimation and compensation
JP2008510358A (en) * 2004-08-13 2008-04-03 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Motion estimation and compensation for panorama video
JP2016052056A (en) * 2014-09-01 2016-04-11 株式会社ソシオネクスト Encoding circuit, and encoding method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100377240B1 (en) * 2000-02-22 2003-03-28 김태원 Method of compressing and restoring data for moving pictures
US7151799B2 (en) 2002-03-14 2006-12-19 Kddi Corporation Transcoder for coded video
JP2008510359A (en) * 2004-08-13 2008-04-03 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Panorama motion estimation and compensation
JP2008510358A (en) * 2004-08-13 2008-04-03 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Motion estimation and compensation for panorama video
JP4842945B2 (en) * 2004-08-13 2011-12-21 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Panorama motion estimation and compensation
JP4846719B2 (en) * 2004-08-13 2011-12-28 インダストリー・アカデミック・コーオペレーション・ファウンデーション・キョンヒ・ユニヴァーシティ Panorama motion estimation and compensation
JP2007135036A (en) * 2005-11-11 2007-05-31 Kddi Corp Motion vector detection method and moving image encoder
JP4622816B2 (en) * 2005-11-11 2011-02-02 Kddi株式会社 Motion vector detection method and moving picture coding apparatus
JP2016052056A (en) * 2014-09-01 2016-04-11 株式会社ソシオネクスト Encoding circuit, and encoding method
US10448047B2 (en) 2014-09-01 2019-10-15 Socionext, Inc. Encoder circuit and encoding method

Similar Documents

Publication Publication Date Title
JP5100015B2 (en) Video encoding method and apparatus for inter-screen or intra-screen encoding mode
JP4574090B2 (en) Movie data converter and movie data conversion program
US20090274213A1 (en) Apparatus and method for computationally efficient intra prediction in a video coder
JPH09154137A (en) Method and apparatus for compressing video information usingmovement-dependent estimation
JP2000278688A (en) Motion vector detector, its method and image processor
US8379985B2 (en) Dominant gradient method for finding focused objects
US7433407B2 (en) Method for hierarchical motion estimation
JPH11239354A (en) Motion vector detector
WO2010109564A1 (en) Image encoding apparatus and image encoding method
US20110176027A1 (en) Method and device for compressing moving image
US6697430B1 (en) MPEG encoder
JPH11122618A (en) Image coder
WO2000005899A1 (en) Image encoding system
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JP3677165B2 (en) Moving picture coding apparatus and moving picture coding method
JPH09261530A (en) Video recorder
JP2008289105A (en) Image processing device and imaging apparatus equipped therewith
KR100240620B1 (en) Method and apparatus to form symmetric search windows for bidirectional half pel motion estimation
JP2000059786A (en) Device and method for detecting motion
JP2003032691A (en) Picture coding device corresponding to picture feature
JP2004260251A (en) Apparatus and program of detecting motion vector
JP2005303362A (en) Image coder and program
JP2005151167A (en) Encoding apparatus and encoding program for predicting movement compensation
JPH10191347A (en) Motion detector, motion detecting method and storage medium
JPH07274182A (en) Video signal encoding system