JPH0937258A - Hierarchical warp type motion compensation predict method and its device - Google Patents

Hierarchical warp type motion compensation predict method and its device

Info

Publication number
JPH0937258A
JPH0937258A JP7182376A JP18237695A JPH0937258A JP H0937258 A JPH0937258 A JP H0937258A JP 7182376 A JP7182376 A JP 7182376A JP 18237695 A JP18237695 A JP 18237695A JP H0937258 A JPH0937258 A JP H0937258A
Authority
JP
Japan
Prior art keywords
error
block
image
point
variation point
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.)
Abandoned
Application number
JP7182376A
Other languages
Japanese (ja)
Inventor
Shinichi Matsui
紳一 松井
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP7182376A priority Critical patent/JPH0937258A/en
Publication of JPH0937258A publication Critical patent/JPH0937258A/en
Abandoned legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To avoid reduction in the compression rate while suppressing a heavy load. SOLUTION: A motion detector 103 divides image data of a current frame outputted from an image input device 101 and image data of a preceding frame stored in a frame memory 110 into blocks with cross reference to each other. Then while moving a noted moving point on a preceding frame and its coordinate moving point, an area deformed by the moving is compensated and the compensated area is compared with an area of a corresponding current frame to obtain an error and a coordinate minimizing the error is set to each moving point of the preceding frame. In this case, when the entire error between frames is not within a permissible range, a moving is added newly to reduce the block size and an error minimum position of the moving point added newly is continuously detected.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、画像を変形(歪ま
せる)ことで動き補償予測を行うワープタイプ動き補償
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to warp-type motion compensation that performs motion compensation prediction by deforming (distorting) an image.

【0002】[0002]

【従来の技術】近年、フレーム間の相関を利用した符号
化(フレーム間符号化)が広く行われている。フレーム
間予測などの場合、動画像になると符号化効率が極端に
低下することが多いことから、動画像の符号化には動き
補償予測という手法が広く用いられている。
2. Description of the Related Art In recent years, coding using interframe correlation (interframe coding) has been widely performed. In the case of inter-frame prediction or the like, the coding efficiency is often extremely reduced in the case of a moving image, and therefore a method called motion compensation prediction is widely used for coding a moving image.

【0003】図8は、一般的な動き補償予測による画像
のシフト例を示す図である。図8において、(a)は前
フレームの画像,(b)は現フレームの画像である。一
般的に広く用いられている動き補償予測は、現フレーム
の画像との予測誤差が最小となるように前フレームの画
像を縦及び横方向に全体的にシフトするものである。図
8は、前フレームの画像を右上方に、即ち点P1の座標
位置から点P2の座標位置にシフトした場合を示してい
る。点P1から点P2へのシフト量が動きベクトル量で
ある。図8(a)の画像と図8(b)の画像はそのなか
の物体(王様)の位置を除いて目の部分だけが異なって
いる。従って、この動き補償予測を行った場合、目の部
分及びその周辺の画素値の誤差(差分)と上記動きベク
トル量の情報を送るだけで前フレームの画像から現フレ
ームの画像を得ることができる。画像をシフトするだけ
で両者が一致した場合には、動きベクトル量と前フレー
ムの画像から現フレームの画像を得ることができる。
FIG. 8 is a diagram showing an example of image shift by general motion compensation prediction. In FIG. 8, (a) is the image of the previous frame, and (b) is the image of the current frame. Motion compensation prediction, which is generally widely used, shifts the image of the previous frame entirely in the vertical and horizontal directions so that the prediction error from the image of the current frame is minimized. FIG. 8 shows a case where the image of the previous frame is shifted to the upper right, that is, from the coordinate position of the point P1 to the coordinate position of the point P2. The shift amount from the point P1 to the point P2 is the motion vector amount. The image of FIG. 8A and the image of FIG. 8B are different only in the eye part except the position of the object (king) in the image. Therefore, when this motion-compensated prediction is performed, the image of the current frame can be obtained from the image of the previous frame only by sending the error (difference) between the pixel values of the eye part and its periphery and the information on the above-mentioned motion vector amount. . If the two images match only by shifting the image, the current frame image can be obtained from the motion vector amount and the previous frame image.

【0004】上記の動き補償予測は、剛体のような物体
がフレーム間で動いている場合、非常に効率のよい符号
化を実現することができる。しかし、物体がフレーム間
で拡大、縮小、形状の変化といったように変形していた
場合、その発生符号量は大きくなり、効率のよい符号化
を行えないという不具合が発生する。この不具合を回避
し、物体の様々な動きに対応することができるワープタ
イプ動き補償予測が最近注目されている。
The motion-compensated prediction described above can achieve very efficient coding when an object such as a rigid body is moving between frames. However, when the object is deformed between frames such as enlargement, reduction, or change in shape, the generated code amount becomes large, which causes a problem that efficient encoding cannot be performed. Warp-type motion-compensated prediction, which can avoid this inconvenience and can cope with various movements of an object, has recently attracted attention.

【0005】ワープタイプ動き補償予測は、2つの画像
を各々同数で同じ形状のブロックに対応させて分割し、
一方の画像のブロックの形状を固定し、この固定したブ
ロックに最も一致するように他方の画像のブロックを変
形(移動を含む)させることを基本とする。図9は、こ
のワープタイプ動き補償予測を説明する図である。図9
において、(a)は現フレームの画像、(b)は前フレ
ームの画像である。また、図中の破線はブロックの形状
を各々表しており、これらのブロックはその角の点(A
やa等の破線が交差する点(頂点))の位置によってそ
の形状、及びその位置が制御される。
In the warp type motion compensation prediction, two images are divided into blocks each having the same number and the same shape.
Basically, the shape of a block of one image is fixed, and the block of the other image is deformed (including moved) so as to best match the fixed block. FIG. 9 is a diagram for explaining this warp type motion compensation prediction. FIG.
In (a), the image of the current frame is shown, and (b) is the image of the previous frame. Also, the broken lines in the figure represent the shapes of the blocks, and these blocks are shown at their corner points (A
The shape and the position are controlled by the position of the point (vertex) at which the broken lines such as a and a intersect.

【0006】普通、ワープタイプ動き補償予測では、図
9(a)に示すように現フレーム(及び前フレーム)の
画像をブロックに分割し、現フレームの対応するブロッ
クに投影させた際の状態(補償後のブロック)が最も一
致するように、図8(b)に示す前フレームのブロック
を変形する。
Normally, in the warp type motion compensation prediction, as shown in FIG. 9 (a), the image of the current frame (and the previous frame) is divided into blocks, and the state when the image is projected on the corresponding block of the current frame ( The block of the previous frame shown in FIG. 8B is transformed so that the (compensated block) is the best match.

【0007】画像の変形方法は非常に多く、対象とする
画像毎にその変形に適する変形方法を見つけるには非常
に複雑な処理を行わなければならず、現実的でない。こ
のため、ワープタイプ動き補償予測では、様々な画像に
対して柔軟、且つ容易に対応できるように、画像をブロ
ック化し、このブロックを処理単位としてその変形を行
う手法が一般的に採用されている。また、ブロックの変
形を行う前に、動きベクトルの検出による画像の全体的
なシフトも一般的に行われている。
There are many image transformation methods, and it is not realistic to perform a very complicated process for finding a transformation method suitable for the transformation for each target image. Therefore, in the warp type motion compensation prediction, a method of dividing an image into blocks and transforming the blocks into processing units is generally adopted so that various images can be flexibly and easily dealt with. . In addition, before the block is deformed, a general shift of an image by detecting a motion vector is also generally performed.

【0008】上記変形は、現フレーム上において変形す
る対象(王様)をその内部に含むブロックの各頂点を
A、B、C、D、E、Fとした場合、これらの頂点A、
B、C、D、E、Fに対応する前フレーム上の頂点a、
b、c、d、e、f(このように、現フレームの頂点は
大文字、前フレームの対応する頂点は小文字で表すこと
にする)の各座標位置を検出(設定)することに対応す
る。このようにして前フレームの各頂点に新たに座標位
置を設定した後に行われるブロックの投影は、これによ
って変形した前フレームのブロックから、その形状を現
フレームの対応するブロックの形状(これは元の形状に
等しい)に一致させた際の状態を求めることであり、こ
れはワープタイプにおいてブロックに対する動き補償
(補正)に相当する。ブロックの投影は、普通、現フレ
ームのブロック内の点(画素)の座標位置を移動させな
がら、その座標位置に対応する前フレームのブロック上
の座標位置を求めた後、この求めた座標位置の画素値を
算出することで行われる。
In the above-mentioned transformation, when the vertices of a block including the object (king) to be transformed on the current frame are A, B, C, D, E, and F, these vertices A,
Vertex a on the previous frame corresponding to B, C, D, E, F,
It corresponds to detecting (setting) each coordinate position of b, c, d, e, f (in this way, the vertices of the current frame are represented by capital letters and the corresponding vertices of the previous frame are represented by lowercase letters). In this way, the projection of the block, which is performed after newly setting the coordinate position at each vertex of the previous frame, changes the shape from the block of the previous frame, which is the shape of the corresponding block of the current frame (this is the original (Equal to the shape of), which is equivalent to the motion compensation (correction) for the block in the warp type. The block projection is usually performed by moving the coordinate position of a point (pixel) in the block of the current frame, and after finding the coordinate position on the block of the previous frame corresponding to the coordinate position, It is performed by calculating the pixel value.

【0009】このブロックの投影により、例えば前フレ
ームにおいて頂点abcdで示すブロックは、現フレー
ムにおいて頂点ABCDで示すブロックに投影される。
これにより、前フレームと現フレーム間の対応するブロ
ック内の画素は1対1に対応し、ブロック毎の比較を行
うことができる。なお、ブロックの投影を別の言葉で表
現すれば、変形させたブロックを、そのままの状態で形
状だけ元の形状に戻すことから、図形変換が該当する。
By the projection of this block, for example, the block indicated by the vertex abcd in the previous frame is projected onto the block indicated by the vertex ABCD in the current frame.
As a result, the pixels in the corresponding blocks between the previous frame and the current frame have a one-to-one correspondence, and it is possible to perform comparison for each block. If the projection of the block is expressed by another word, the deformed block is returned to the original shape by the shape as it is, which corresponds to the figure conversion.

【0010】ワープタイプ動き補償予測では、ブロック
間の誤差即ちブロック内の対応する画素毎の画素値の差
分の合計値が最小となる各頂点の座標位置を、検出し設
定する。ワープタイプ動き補償予測を用いた画像データ
の符号化では、現フレームと各ブロックを投影させた後
の前フレームとがブロックを基準に対応させられ、対応
する各画素の画素値の差分が符号化される。このときに
は、動きベクトル量、及び各変動点の基準位置(最初に
設定された座標位置)からの変位等の、動きに関する情
報も符号化される。
In the warp-type motion-compensated prediction, the coordinate position of each apex at which the sum of error between blocks, that is, the difference between pixel values of corresponding pixels in the block is minimized is detected and set. In encoding image data using warp-type motion-compensated prediction, the current frame and the previous frame after projecting each block are associated with each other on the basis of the block, and the difference in pixel value of each corresponding pixel is encoded. To be done. At this time, information about the motion such as the motion vector amount and the displacement of each variation point from the reference position (the coordinate position initially set) is also encoded.

【0011】ワープタイプ動き補償予測では、このよう
に画像のブロック化を行っているが、各頂点(aやb
等)の対応する座標位置を検出することは非常に困難で
ある。このため、各頂点(aやb等)の座標位置の検出
は、ある位置を基準位置としてその近傍に頂点を移動さ
せながら(この移動を行うことから、以降、頂点のこと
を変動点と記す)、その移動を行う度にブロックの投影
(補正)を行ってフレーム間の対応するブロックを比較
し、比較した結果の中で最も誤差が小さかった座標位置
を検出(抽出)することにより行う、いわば試行錯誤的
な手法が用いられている。
In warp-type motion-compensated prediction, the image is divided into blocks as described above, but at each vertex (a or b)
It is very difficult to detect the corresponding coordinate position of (). Therefore, the coordinate position of each vertex (a, b, etc.) is detected while moving the vertex in the vicinity of a certain position as the reference position (since this movement is performed, the vertex is hereinafter referred to as a variation point. ), Each time the movement is performed, the blocks are projected (corrected), the corresponding blocks between the frames are compared, and the coordinate position with the smallest error among the comparison results is detected (extracted). So to speak, trial and error methods are used.

【0012】図10〜図12を参照して、上記変動点の
座標位置検出、及び投影(図形変換)についてさらに説
明する。図10は、実際の変動点の状態を説明する図で
ある。図10において、A〜Lは現フレーム上における
各変動点(座標位置)、a〜lはそれらに対応する前フ
レーム上における変動点(座標位置)を各々示す。
The coordinate position detection and projection (figure conversion) of the fluctuation point will be further described with reference to FIGS. FIG. 10 is a diagram illustrating an actual state of the variation point. In FIG. 10, reference characters A to L respectively indicate the changing points (coordinate positions) on the current frame, and reference characters a to l respectively indicate the changing points (coordinate positions) on the previous frame.

【0013】先ず、図10(a)に示すように画像をブ
ロックに分割し、このブロックを基に前フレームと現フ
レームとの間の動きベクトルを検出することで、前フレ
ームにおける各変動点のおおよその位置を確定する。こ
の位置が変動点を移動させるうえでの基準位置となる。
First, as shown in FIG. 10 (a), the image is divided into blocks, and the motion vector between the previous frame and the current frame is detected based on this block. Determine the approximate position. This position serves as a reference position for moving the fluctuation point.

【0014】基準位置が確定した後は、前フレームの各
変動点毎に、その基準位置を中心にして順次移動させな
がら、その移動により変形したブロックの投影を行い、
現フレームの対応するブロックと対比する。
After the reference position is determined, the block deformed by the movement is projected for each variation point of the previous frame while sequentially moving around the reference position.
Contrast with the corresponding block in the current frame.

【0015】図11は、変動点の移動に伴うブロックの
形状変化例を示す図である。図11に示すように、変動
点bをb’からb”に移動させると、これに伴い、変動
点b、及びその周囲の変動点a、c、d、e、f、j、
k、lによって形成される4つのブロックの形状が変化
する。このため、変動点bを移動させると、4つのブロ
ックからなる8角形ajklcfedと8角形AJKL
CFEDの間の誤差を算出する。
FIG. 11 is a diagram showing an example of a change in the shape of a block due to the movement of the variation point. As shown in FIG. 11, when the fluctuation point b is moved from b ′ to b ″, the fluctuation point b and the fluctuation points a, c, d, e, f, j,
The shape of the four blocks formed by k, l changes. Therefore, when the variation point b is moved, an octagon ajkklcfed and an octagon AJKL consisting of four blocks are moved.
Calculate the error between CFED.

【0016】1つのブロックは複数の変動点によって表
され、そのなかの1つの変動点を移動させるだけで、現
フレームと前フレームとでブロック内の対応する座標位
置が変化する。このため、フレーム間における誤差を最
小にする座標位置(以降、誤差最小位置と記す)の検出
は各変動点に対して繰り返し行う。図10〜図12にお
いて、「’」は最初に検出した誤差最小位置、「”」は
2番目に検出したその座標位置である(これは、以降に
おいても同様に表現する)。図11の例は、1度目の誤
差最小位置の検出を各変動点に対して全て行い、変動点
aに対して2度目の最小座標位置を検出した後、変動点
bに対して2度目の最小座標位置の検出を行っている状
態を表している。経験的には、各変動点に対して誤差最
小位置の検出を2回程繰り返すと、誤差最小位置の変動
は実用上十分なレベルに収束する。
One block is represented by a plurality of fluctuation points, and the corresponding coordinate position in the block is changed between the current frame and the previous frame simply by moving one of the fluctuation points. Therefore, the coordinate position that minimizes the error between frames (hereinafter, referred to as the minimum error position) is repeatedly detected for each variation point. In FIGS. 10 to 12, “′” is the minimum error position detected first, and “″” is the coordinate position detected second (this will be expressed in the same manner hereinafter). In the example of FIG. 11, the first error minimum position is detected for each variation point, the second minimum coordinate position is detected for the variation point a, and then the second variation coordinate point is detected for the variation point b. This shows a state in which the minimum coordinate position is being detected. Empirically, when the detection of the minimum error position is repeated twice for each variation point, the variation of the minimum error position converges to a practically sufficient level.

【0017】図12は、ワープタイプ動き補償予測にお
ける投影方法を説明する図である。この投影は、上記し
たように、変動点を移動させることで変形させたブロッ
クの形状を、その内部の画素数、相対的な画素の配置関
係はそのままで元の形状(現フレームの対応するブロッ
クの形状に等しい)に戻すことに相当する。その投影方
法としては幾つか考えられるが、アフィン変換が用いら
れることが多い。
FIG. 12 is a diagram for explaining a projection method in warp type motion compensation prediction. In this projection, as described above, the shape of the block deformed by moving the fluctuation point is changed to the original shape (the corresponding block of the current frame) while maintaining the number of pixels inside and the relative pixel arrangement. Equivalent to the shape of). There are several possible projection methods, but affine transformation is often used.

【0018】このアフィン変換には、直線は直線に変換
し、直線上の点の比は保存する、という性質が知られて
いる。図12(a)のブロックABED内の点(画素)
Pは、そのブロックの領域(境界)を示す線AB、B
E、AD、DEにその座標位置を投影させた際の比率は
全て1:3であるが、アフィン変換を用いた場合、この
比率はブロックを変形させた前フレームにおいても保存
される。即ち同図(b)に示すように、現フレーム上の
点(画素)Pに対応する前フレーム上の点(画素)pの
位置は、ブロックの領域(境界)を示す線a”b”、
b”e’、d’e’、a”d’にその座標位置を投影さ
せた際の比率は全て1:3となる。これは、他の点(画
素)においても同様である。
It is known that this affine transformation converts a straight line into a straight line and preserves the ratio of points on the straight line. Points (pixels) in the block ABED of FIG.
P is a line AB, B indicating the area (boundary) of the block
The ratios when the coordinate positions are projected on E, AD, and DE are all 1: 3, but when affine transformation is used, this ratio is preserved even in the previous frame in which the block is deformed. That is, as shown in FIG. 6B, the position of the point (pixel) p on the previous frame corresponding to the point (pixel) P on the current frame is the line a "b" indicating the area (boundary) of the block,
The ratios when the coordinate positions are projected on b ″ e ′, d′ e ′, and a ″ d ′ are all 1: 3. This also applies to other points (pixels).

【0019】このようにして、現フレームのブロック内
の座標位置に対応する前フレームのブロック内の座標位
置が求まる。現フレームでは、各座標位置には1つの画
素が対応しているが、前フレームではブロックを変形さ
せるために、現フレームの座標位置から求めた前フレー
ムの対応する座標位置は整数値で表現される前フレーム
の座標位置と普通一致しない。このため、求めた座標位
置周辺の画素の値を用いて補間演算を行い、この座標位
置の画素値を算出する。これは、ブロック内の他の求め
た座標位置(画素)においても同様である。
In this way, the coordinate position in the block of the previous frame corresponding to the coordinate position in the block of the current frame is obtained. In the current frame, one pixel corresponds to each coordinate position, but in the previous frame, in order to deform the block, the corresponding coordinate position of the previous frame obtained from the coordinate position of the current frame is expressed by an integer value. It usually does not match the coordinate position of the previous frame. Therefore, interpolation calculation is performed using the values of the pixels around the obtained coordinate position, and the pixel value at this coordinate position is calculated. This is the same at other obtained coordinate positions (pixels) in the block.

【0020】このように、現フレームのブロック内の各
座標位置に対応する前フレームのブロック内の各座標位
置を算出し、該算出した各座標位置の画素値を算出する
ことで、変形させた前フレームのブロックの元の形状へ
の投影、即ちブロックの動き補償(補正)が行われる。
In this way, the coordinate positions in the block of the previous frame corresponding to the coordinate positions in the block of the current frame are calculated, and the pixel value of each of the calculated coordinate positions is calculated, thereby transforming. The projection of the block of the previous frame to the original shape, that is, the motion compensation (correction) of the block is performed.

【0021】[0021]

【発明が解決しようとする課題】従来のワープタイプ動
き補償予測では、画像を分割するブロックサイズを固定
にしていた。このため、各変動点の誤差最小位置を正確
に検出しても、フレーム間の画像変化の大きさに応じて
発生符号量(圧縮率)が変動するという問題点があっ
た。
In the conventional warp type motion compensation prediction, the block size for dividing an image is fixed. Therefore, even if the minimum error position of each variation point is accurately detected, the generated code amount (compression rate) varies depending on the magnitude of the image change between frames.

【0022】発生符号量が少ない場合には問題は通常発
生しないが、発生符号量が多い場合、1フレーム分の画
像データの転送に長く時間がかかり、画像の更新間隔が
延びて画像上の物体の動きが不自然になったりする。
When the generated code amount is small, the problem does not usually occur, but when the generated code amount is large, it takes a long time to transfer the image data for one frame, and the update interval of the image is extended to extend the object on the image. The movement of is unnatural.

【0023】ワープタイプ動き補償予測では、上述した
ように、各変動点の誤差最小位置の検出は試行錯誤的な
手法で行っており、誤差最小位置の検出には変動点を移
動させる度に、その移動によって変形する領域を画像間
で対比することから、1変動点の誤差最小位置を検出す
るまでにも多くの計算を行わなければならない。変動点
の数を増やす程、即ちブロックサイズを小さくする程、
動き補償予測を高精度に行えることから、発生符号量は
低減する傾向がある。しかし、ブロックサイズを小さく
する程、それによって増えた変動点の数に応じて計算量
が増大し、負荷が重くなるという問題点が発生するた
め、発生符号量を常に低く抑えられるようにブロックサ
イズを設定することは現実的でない。負荷が重くなる
と、高速な演算処理を行えるシステムを用意しなければ
ならず、そのコストの上昇や、大型化を招くことにな
る。
In the warp type motion compensation prediction, as described above, the minimum error position of each fluctuation point is detected by a trial and error method, and the minimum error position is detected every time the fluctuation point is moved. Since the regions that are deformed by the movement are compared between images, many calculations must be performed before the error minimum position of one variation point is detected. The larger the number of fluctuation points, that is, the smaller the block size,
Since the motion compensation prediction can be performed with high accuracy, the generated code amount tends to be reduced. However, the smaller the block size, the more the amount of calculation increases according to the increased number of fluctuation points, and the heavier the load becomes.Therefore, it is necessary to keep the generated code amount low. Setting is not realistic. When the load becomes heavy, it is necessary to prepare a system capable of high-speed arithmetic processing, which leads to an increase in cost and an increase in size.

【0024】本発明の課題は、負荷の重さを抑えつつ、
圧縮率の低下を回避することにある。
The object of the present invention is to reduce the weight of the load while
This is to avoid a reduction in compression rate.

【0025】[0025]

【課題を解決するための手段】本発明の第1の態様の階
層型ワープタイプ動き補償予測方法は、次の処理工程を
有する。
The hierarchical warp type motion compensation prediction method according to the first aspect of the present invention has the following processing steps.

【0026】先ず、第1の処理工程では、2つの画像上
に、指定されたブロックサイズに応じて、ブロック領域
の境界を示す変動点をそれぞれ対応させて配置する。第
2の処理工程では、2つの画像の一方の画像上に配置さ
れた変動点を移動させることによって変形させたブロッ
ク領域を、その元の形状に投影させた状態を求めること
で補償を行う。第3の処理工程では、第2の処理工程で
補償したブロック領域と2つの画像の他方の画像上の対
応するブロック領域との間の画像情報の誤差を算出す
る。最後の第4の処理工程では、第3の処理工程で算出
した誤差が最小となる誤差最小位置を各変動点毎に設定
する。
First, in the first processing step, the variation points indicating the boundaries of the block areas are arranged on the two images in correspondence with each other according to the designated block size. In the second processing step, compensation is performed by obtaining the state in which the block area deformed by moving the variation point arranged on one of the two images is projected onto its original shape. In the third processing step, the error of the image information between the block area compensated in the second processing step and the corresponding block area on the other image of the two images is calculated. In the last fourth processing step, the minimum error position where the error calculated in the third processing step is the minimum is set for each variation point.

【0027】第2の態様の階層型ワープタイプ動き補償
予測方法では、上記の処理工程に加えて以下の第5〜第
7の処理工程をさらに有する。先ず、第5の処理工程で
は、第4の処理工程により誤差最小位置を各変動点にそ
れぞれ設定し、各ブロック領域に第2の処理工程を施す
ことで得られる一方の画像を、他方の画像と比較するこ
とで得られる画像情報の誤差を算出する。第6の処理工
程では、第5の処理工程で算出した2つの画像間の画像
情報の誤差が所定の許容範囲内であるか否か判断する。
第7の処理工程では、第6の処理工程の判断処理を行っ
た結果、2つの画像間の画像情報の誤差が所定の許容範
囲内でなかった場合、現在指定中のブロックサイズより
も小さいブロックサイズを新たに指定して変動点の誤差
最小位置の設定を繰り返させる。
The hierarchical warp type motion compensation prediction method of the second aspect further includes the following fifth to seventh processing steps in addition to the above processing steps. First, in the fifth processing step, one image obtained by setting the minimum error position at each fluctuation point in the fourth processing step and applying the second processing step to each block region The error of the image information obtained by comparing with is calculated. In the sixth processing step, it is judged whether or not the error of the image information between the two images calculated in the fifth processing step is within a predetermined allowable range.
In the seventh processing step, if the error in the image information between the two images is not within a predetermined allowable range as a result of the determination processing in the sixth processing step, a block smaller than the block size currently specified The size is newly designated and the setting of the minimum error position of the variation point is repeated.

【0028】なお、第2の態様の階層型ワープタイプ動
き補償予測方法では、第6の処理工程でブロックサイズ
が新たに指定された場合において、第1の処理工程で
は、誤差最小位置が設定されている変動点に、新たに変
動点を追加することでブロックサイズを変更し、第4の
処理工程では、新たに追加した変動点に対してのみ誤差
最小位置の設定を行わせるようにさせる、ことが望まし
い。
In the hierarchical warp type motion compensation prediction method of the second aspect, when the block size is newly designated in the sixth processing step, the minimum error position is set in the first processing step. The block size is changed by adding a new variation point to the existing variation point, and in the fourth processing step, the minimum error position is set only for the newly added variation point. Is desirable.

【0029】本発明の第1の態様のワープタイプ動き補
償予測装置では、以下の手段を備える。先ず、変動点配
置手段は、2つの画像上に、指定されたブロックサイズ
に応じて、ブロック領域の境界を示す変動点をそれぞれ
対応させて配置する。補償手段は、2つの画像の一方の
画像上に変動点配置手段が配置した変動点を移動させる
ことによって変形させたブロック領域を、その元の形状
に投影させた状態を求めることで補償を行う。領域間誤
差算出手段は、補償手段が補償したブロック領域と2つ
の画像の他方の画像上の対応するブロック領域との間の
画像情報の誤差を算出する。位置設定手段は、領域間誤
差算出手段が算出した誤差が最小となる誤差最小位置を
各変動点毎に設定する。
The warp type motion compensation prediction apparatus of the first aspect of the present invention comprises the following means. First, the variation point arranging unit arranges the variation points indicating the boundaries of the block areas on the two images in correspondence with each other according to the designated block size. The compensating means performs compensation by obtaining a state in which the block area deformed by moving the fluctuation point arranged by the fluctuation point arranging means on one of the two images is projected onto its original shape. . The inter-region error calculation means calculates the error of the image information between the block area compensated by the compensation means and the corresponding block area on the other image of the two images. The position setting means sets an error minimum position at which the error calculated by the inter-region error calculating means becomes minimum for each variation point.

【0030】第2の態様の階層型ワープタイプ動き補償
予測装置は、上記各手段に加えて以下の手段をさらに具
備する。画像間誤差算出手段は、位置設定手段が誤差最
小位置を各変動点にそれぞれ設定し、補償手段がその状
態から各ブロック領域の補償を行うことで得られる一方
の画像を、他方の画像と比較することで得られる2つの
画像間の画像情報の誤差を算出する。制御手段は、画像
間誤差算出手段が算出した誤差が所定の許容範囲内か否
か判断し、該誤差が許容範囲内でないと判断した場合
に、現在指定中のブロックサイズよりも小さいブロック
サイズを新たに指定し、変動点の誤差最小位置の設定を
繰り返させる制御を実行する。
The hierarchical warp type motion compensation prediction apparatus of the second aspect further comprises the following means in addition to the above means. The inter-image error calculating means compares one image with the other image obtained by the position setting means setting the minimum error position at each fluctuation point and the compensating means compensating each block area from that state. The error of the image information between the two images obtained by doing is calculated. The control means determines whether or not the error calculated by the inter-image error calculation means is within a predetermined allowable range, and if it is determined that the error is not within the allowable range, a block size smaller than the currently specified block size is set. Control is performed to newly specify and repeat the setting of the minimum error position of the variation point.

【0031】なお、第2の態様の階層型ワープタイプ動
き補償予測装置では、制御手段がブロックサイズを新た
に指定した場合において、変動点配置手段は、誤差最小
位置が設定されている変動点に、新たに変動点を追加し
て配置することでブロックサイズを変更し、補償手段
は、新たに配置された変動点のみを着目してその移動、
及び補償を行い、位置設定手段は、新たに配置された変
動点の誤差最小位置の設定のみ行う、ことが望ましい。
In the hierarchical warp type motion compensation predicting apparatus of the second aspect, when the control means newly specifies the block size, the variation point allocating means determines the variation point at which the minimum error position is set. , The block size is changed by newly adding and arranging the changing point, and the compensating means focuses only on the newly arranged changing point and moves the block,
It is preferable that the position setting means only sets the minimum error position of the newly arranged fluctuation point.

【0032】ブロックサイズが小さくなる程、予測に要
する計算量は多くなり、その負荷は増大するが、その一
方ではより高精度な予測が行えるようになり、圧縮率が
向上する。ブロックサイズを複数用意(ブロックサイズ
を階層化)することにより、負荷の重さ、及び圧縮率の
制御が可能となる。
As the block size decreases, the amount of calculation required for prediction increases and the load increases, but on the other hand, more accurate prediction can be performed and the compression rate improves. By preparing a plurality of block sizes (hierarchizing the block sizes), it becomes possible to control the weight of the load and the compression rate.

【0033】補償を行った一方の画像と他方の画像間の
画像情報の誤差が許容範囲内に収まるように、ブロック
サイズを順次小さく設定していくことで、高い圧縮率の
維持が可能になると同時に、予測に要する計算量を必要
最小限に抑えることが可能になる。
If the block size is successively set to be small so that the error of the image information between the compensated one image and the other image falls within the allowable range, a high compression rate can be maintained. At the same time, it becomes possible to minimize the amount of calculation required for prediction.

【0034】ブロックサイズの変更は、ブロック領域の
境界を示す変動点の数の変更に対応する。ブロックサイ
ズを小さくする変更では、それまで配置していた変動点
数を増やすことになる。このブロックサイズを小さくす
る変更を、既に配置されている変動点に新たに変動点を
追加することで行うことにより、既に誤差最小位置の設
定が行われた変動点についてはそれを利用することが可
能となる。既に設定されている誤差最小位置を利用した
場合、新たに追加した変動点の誤差最小位置を設定する
だけでより高精度な予測が可能であることから、ブロッ
クサイズの変更に伴って新たに実行する計算量を少なく
抑えることになり、負荷がより軽減される。
The change of the block size corresponds to the change of the number of fluctuation points indicating the boundary of the block area. The change to reduce the block size will increase the number of fluctuation points that have been placed until then. This change to reduce the block size is performed by adding a new variation point to the variation point that has already been placed, so that it can be used for the variation point for which the minimum error position has already been set. It will be possible. If the minimum error position that has already been set is used, more accurate prediction can be performed simply by setting the minimum error position of the newly added fluctuation point, so it is newly executed when the block size is changed. The amount of calculation to be performed is reduced, and the load is further reduced.

【0035】[0035]

【発明の実施の形態】以下、本発明の実施例について、
図面を参照しながら詳細に説明する。図1は、本発明に
よる実施例を採用したシステムのブロック図である。こ
のシステムは、テレビ電話、テレビ会議等に用いられる
ものである。これらに用いられるシステムは音声を扱う
が、ここでは音声に関わる部分については説明を省略
し、画像処理に関わる部分のみ説明することにする。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below.
A detailed description will be given with reference to the drawings. FIG. 1 is a block diagram of a system adopting an embodiment according to the present invention. This system is used for video telephones, video conferences, and the like. The systems used for these handle audio, but here, description of parts related to audio is omitted, and only parts related to image processing are described.

【0036】図1において、画像入力装置101は、例
えばCCD(Charge Coupled Device)、及びその駆動
回路等からなり、画像データの取り込みを行う。この画
像入力装置101が取り込んだ画像データは減算器10
2、及び動き検出器103に出力される。
In FIG. 1, an image input device 101 is composed of, for example, a CCD (Charge Coupled Device) and its drive circuit, and captures image data. The image data captured by the image input device 101 is the subtractor 10
2 and the motion detector 103.

【0037】減算器102は、画像入力装置101から
出力された画像データと、後述するようにしてワープタ
イプ動き補償を施した後の前フレームの画像データとの
減算を行い、画素データ毎にその差分を算出する。量子
化器104は、この差分を、例えばDCT変換を行って
DCT係数に変換した後、予め用意した量子化テーブル
を用いて量子化する。
The subtractor 102 subtracts the image data output from the image input device 101 from the image data of the previous frame after the warp type motion compensation is performed as described later, and the subtraction is performed for each pixel data. Calculate the difference. The quantizer 104 quantizes the difference using a quantization table prepared in advance, for example, after performing DCT conversion to convert the difference into a DCT coefficient.

【0038】可変長符号化器105は、例えば量子化器
104が量子化した後のDCT係数を直流成分と交流成
分とにグループ分けし、各グループ毎にハフマン符号化
方式を用いて符号化する。この符号化が終了すると、こ
れにより生成した符号化後の画像データ(圧縮データ)
をバッファ106に随時出力する。このバッファ106
は、画像(フレーム)毎の発生符号量(圧縮データ
量)、符号化における速度(フレーム間の画像がよく似
ていると符号化は高速に行える)の変動を吸収するため
のものである。また、可変長符号化器105は、量子化
器104が量子化したDCT係数の他に、画像データを
量子化した際に用いた量子化テーブル、ハフマン符号テ
ーブル、及び動き検出器103から入力した画像上の物
体の動きに関する情報を所定の方式で符号化し、バッフ
ァ106に出力する。
The variable-length encoder 105 divides the DCT coefficient, which has been quantized by the quantizer 104, into a DC component and an AC component, and encodes each group using the Huffman encoding method. . When this encoding is completed, the encoded image data (compressed data) generated by this
Is output to the buffer 106 at any time. This buffer 106
Is for absorbing fluctuations in the generated code amount (compressed data amount) for each image (frame) and the encoding speed (encoding can be performed at high speed if the images between frames are similar). In addition to the DCT coefficients quantized by the quantizer 104, the variable-length encoder 105 also receives the quantization table used when the image data is quantized, the Huffman code table, and the motion detector 103. Information on the movement of the object on the image is encoded by a predetermined method and output to the buffer 106.

【0039】網インターフェイス部107は、ISDN
(Integrated Service Digital Network)、LAN(Lo
cal Area Network)等の通信網との間のデータの授受を
行い、バッファ106に格納された圧縮データを通信網
に送出し、通信網から圧縮データを受け取り、これをバ
ッファ112に格納する。
The network interface section 107 is an ISDN.
(Integrated Service Digital Network), LAN (Lo
data is exchanged with a communication network such as a cal area network, the compressed data stored in the buffer 106 is sent to the communication network, the compressed data is received from the communication network, and the compressed data is stored in the buffer 112.

【0040】逆量子化器108は、量子化器104から
出力された画像データ、即ち量子化されたDCT係数を
元の画像データ(差分)に復号し、加算器109に出力
する。加算器109は、この逆量子化器108が出力し
た画像データと、後述する動き補償器111から出力さ
れた画像データとの加算を行い、その結果をフレーム・
メモリ110に出力する。
The inverse quantizer 108 decodes the image data output from the quantizer 104, that is, the quantized DCT coefficient into the original image data (difference), and outputs it to the adder 109. The adder 109 adds the image data output from the dequantizer 108 and the image data output from the motion compensator 111, which will be described later, and outputs the result to the frame
Output to the memory 110.

【0041】動き検出器103は、次のフレームの画像
データが画像入力装置101から出力されると、フレー
ム・メモリ110に格納されている直前のフレームの画
像データを参照し、画像中の物体の全体的な移動、その
変形といった動きを検出し、その検出結果を動き補償器
111、及び可変長符号化器105に出力する。上述し
たように、可変長符号化器105は、動き検出器103
から送られた動きの情報を符号化する。他方の動き補償
器111は、動き検出器103から送られた動きの情報
に従ってフレーム・メモリ110に格納されている画像
データの補償を行い、減算器102、及び加算器109
に出力する。
When the image data of the next frame is output from the image input device 101, the motion detector 103 refers to the image data of the immediately preceding frame stored in the frame memory 110 to detect the object in the image. The motion such as the overall movement and its deformation is detected, and the detection result is output to the motion compensator 111 and the variable length encoder 105. As described above, the variable length encoder 105 includes the motion detector 103.
Encodes the motion information sent by. The other motion compensator 111 compensates the image data stored in the frame memory 110 according to the motion information sent from the motion detector 103, and the subtractor 102 and the adder 109.
Output to

【0042】このとき、動き補償器111から出力され
た画像データは、前フレームの画像データに対し、動き
検出器103が検出した画像(物体)の動きを反映させ
て補償したものである。これは、受信側においても、送
った動き情報に従って前フレームの画像データを補償す
ることで同じものが生成される。これにより、減算器1
02は、画像入力装置101から入力した現フレームの
画像データと、受信側が動き情報により補償した前フレ
ームの画像データとの差分を出力する。
At this time, the image data output from the motion compensator 111 is obtained by compensating the image data of the previous frame by reflecting the motion of the image (object) detected by the motion detector 103. The same thing is generated on the receiving side by compensating the image data of the previous frame according to the transmitted motion information. As a result, the subtractor 1
02 outputs the difference between the image data of the current frame input from the image input apparatus 101 and the image data of the previous frame compensated by the motion information on the receiving side.

【0043】他方の加算器109は、動き補償器111
から入力した画像データと、量子化器104、逆量子化
器108を介して入力した減算器102の差分出力を加
算する。このため、フレーム・メモリ110には、受信
側で復元される最終の画像データと同じものが格納され
る。
The other adder 109 is a motion compensator 111.
The image data input from the above is added to the difference output of the subtractor 102 input via the quantizer 104 and the inverse quantizer 108. Therefore, the same data as the final image data restored on the receiving side is stored in the frame memory 110.

【0044】このように、画像データの送信において
は、受信側が復元した画像データの状態を把握するため
に、符号化した画像データを復元するフィードバックを
行いながら、動き補償を行った前フレームの画像データ
との差分、その動き補償を施した内容(動き情報)を符
号化して受信側に送出する。一方、圧縮データ(符号化
後の画像データ)を受信した場合には、画像データの圧
縮とは逆の手順でその復元(復号)が行われる。
As described above, in the transmission of image data, in order to grasp the state of the restored image data on the receiving side, the image of the previous frame for which motion compensation has been performed while performing feedback for restoring the encoded image data The difference from the data and the motion-compensated contents (motion information) are encoded and sent to the receiving side. On the other hand, when the compressed data (encoded image data) is received, the decompression (decoding) is performed by the procedure reverse to the compression of the image data.

【0045】網インターフェイス部107が通信網から
受け取った圧縮データは、一旦バッファ112に格納さ
れる。可変長復号化器113は、圧縮データとしてとも
に送られたハフマン符号テーブルの種類を表すデータに
より、圧縮データをもとのDCT係数に復元し、逆量子
化器114に出力する。この逆量子化器108は、上記
逆量子化器108と基本的に同じものであり、送信側か
ら送られた量子化テーブルの種類を示すデータを基に、
画像データ(差分)を復元する。逆量子化器114が復
元した画像データは、加算器115に送られ、ここで動
き補償器117が出力した画像データに加算される。
The compressed data received by the network interface unit 107 from the communication network is temporarily stored in the buffer 112. The variable length decoder 113 restores the compressed data to the original DCT coefficient by the data representing the type of the Huffman code table sent together as the compressed data, and outputs it to the inverse quantizer 114. The dequantizer 108 is basically the same as the dequantizer 108, and based on the data indicating the type of the quantization table sent from the transmitting side,
Restore image data (difference). The image data restored by the inverse quantizer 114 is sent to the adder 115, where it is added to the image data output by the motion compensator 117.

【0046】加算器115の加算結果は、フレーム・メ
モリ118、及び画像表示装置116に出力される。画
像表示装置116は、例えばCRT(Cathode Ray Tub
e)、及びその駆動回路等からなり、加算器115から
入力した画像データを表示画面に表示し、画像を再現す
る。
The addition result of the adder 115 is output to the frame memory 118 and the image display device 116. The image display device 116 is, for example, a CRT (Cathode Ray Tub).
The image data input from the adder 115 is displayed on the display screen to reproduce the image.

【0047】動き補償器117は、可変長復号化器11
3から送られた動き情報に従い、フレーム・メモリ11
8に格納されている前フレームの画像データを補正す
る。即ち送信側において、動き補償器111が減算器1
02に出力した、動き検出器103が検出した画像上の
物体の動きに応じて補正したフレーム・メモリ110の
画像データを再現する。この画像データと、逆量子化器
114が出力する差分の画像データとの加算を加算器1
15に行わせることにより、送信側のフレーム・メモリ
(図1においてフレーム・メモリ110に対応する)に
格納されている現フレームの画像データは受信側で再現
される。この再現された画像データは、画像表示装置1
16に送られるとともに、フレーム・メモリ118に格
納され、次のフレームの画像データを再現するために使
用される。
The motion compensator 117 is a variable length decoder 11
3 according to the motion information sent from the frame memory 11
The image data of the previous frame stored in 8 is corrected. That is, on the transmitting side, the motion compensator 111 uses the subtractor 1
The image data of the frame memory 110 corrected according to the movement of the object on the image detected by the motion detector 103, which is output to 02, is reproduced. The addition of this image data and the image data of the difference output from the inverse quantizer 114 is performed by the adder 1
The image data of the current frame stored in the frame memory (corresponding to the frame memory 110 in FIG. 1) on the transmitting side is reproduced by the receiving side by causing the receiving side 15 to perform the processing. This reproduced image data is used as the image display device 1.
16 and is stored in the frame memory 118 and used to reproduce the image data of the next frame.

【0048】以上が、本システムの構成、及びその概略
動作である。次に、図2〜図7を参照し、本実施例によ
るフレーム間の物体の動き検出について詳細に説明す
る。この動き検出は、動き検出器103が、フレーム・
メモリ110に格納されている画像データ、及び画像入
力装置101から入力した画像データとを対比しながら
行うものである。図2は、上記動き検出器103が実行
する、本実施例による動き検出処理の動作フローチャー
トである。
The above is the configuration of the present system and its general operation. Next, with reference to FIG. 2 to FIG. 7, the motion detection of the object between frames according to the present embodiment will be described in detail. In this motion detection, the motion detector 103
The image data stored in the memory 110 is compared with the image data input from the image input device 101. FIG. 2 is an operation flowchart of the motion detection process according to the present embodiment, which is executed by the motion detector 103.

【0049】先ず、ステップ201では、画像を分割す
るブロックサイズを表す値が代入される変数grid_
noに0を代入する。本実施例では、フレーム間の誤差
の大きさに応じてブロックサイズを変更させている。こ
のブロックサイズの変更は、画像上に配置する変動点の
数の変更に対応する。
First, in step 201, a variable grid_ is substituted with a value representing a block size for dividing an image.
Substitute 0 for no. In this embodiment, the block size is changed according to the magnitude of the error between the frames. This change in the block size corresponds to the change in the number of changing points arranged on the image.

【0050】図3は、各階層毎に設定される変動点の基
準位置(最初に設定される座標位置)を説明する図であ
る。図3において、An 、Bn 、Cn (nは整数)は変
数grid_noに代入される値に応じて新たに設定
(追加)される画像(画面)上の変動点(座標位置)を
示している。ここで、図3(a)〜(c)の破線は、各
階層毎に追加された変動点の位置関係を表すために図示
したものである。
FIG. 3 is a diagram for explaining the reference position of the variation point (coordinate position initially set) set for each layer. In FIG. 3, A n , B n , and C n (n is an integer) indicate a changing point (coordinate position) on the image (screen) that is newly set (added) according to the value assigned to the variable grid_no. ing. Here, the broken lines in FIGS. 3A to 3C are shown to represent the positional relationship of the variation points added for each layer.

【0051】図3(a)の変数grid_noの値が0
の場合には、破線はブロックの形状を示している。変数
grid_noに1が代入されると、図3(a)に示す
各変動点Aに、同図(b)に示す各変動点Bが新たに追
加されて設定される。これにより、図3(a)のブロッ
クA0 3 2 11を例にとれば、その内部に変動点B
0 が新たに設定されるため、このブロックA0 3 2
11は三角形A2 30 、A2 0 11、A110
0 、及びB0 3 0 に4分割される。このことから明
らかなように、変数grid_noに1を代入させた場
合には、変数grid_noの値が0の場合よりも高精
度な補正を行うことが可能である。
The value of the variable grid_no in FIG. 3A is 0.
In the case of, the broken line shows the shape of the block. When 1 is assigned to the variable grid_no, each variation point B shown in FIG. 3B is newly added to each variation point A shown in FIG. As a result, if the block A 0 A 3 A 2 A 11 in FIG.
Since 0 is newly set, this block A 0 A 3 A 2
A 11 is a triangle A 2 A 3 B 0 , A 2 B 0 A 11 , A 11 B 0 A
0 and B 0 A 3 A 0 are divided into four. As is apparent from this, when 1 is assigned to the variable grid_no, it is possible to perform the correction with higher accuracy than when the value of the variable grid_no is 0.

【0052】一方、変数grid_noに2が代入され
ると、図3(a)及び(b)に示す各変動点A及びB
に、同図(c)に示す各変動点Cが新たに追加されて設
定される。このため、変数grid_noの値が2のと
きに設定されている変動点を全て図示した場合、図3
(d)に示すようになる。
On the other hand, when 2 is assigned to the variable grid_no, the variation points A and B shown in FIGS. 3A and 3B are obtained.
In addition, each variation point C shown in FIG. 7C is newly added and set. Therefore, when all the changing points set when the value of the variable grid_no is 2 are shown in FIG.
As shown in (d).

【0053】変数grid_noの値が2となると、そ
れまでに設定されている変動点により形成されるブロッ
クは更に4分割される。例えば、図3(d)のブロック
31 0 0 は三角形A3 4 0 、B0
4 0 、A3 1 4 、及びC4 1 0 に4分割され
る。このことから明らかなように、変数grid_no
に2を代入させた場合には、変数grid_noの値が
1の場合よりもさらに高精度な補正を行うことが可能で
ある。
When the value of the variable grid_no becomes 2, the
The block formed by the change points that have been set so far
KU is further divided into four. For example, the block of FIG.
AThreeB1A0B0Is a triangle AThreeCFourB0, B0C
FourA0, AThreeB1CFour, And CFourB 1A0Divided into 4
You. As is clear from this, the variable grid_no
When 2 is substituted into, the value of the variable grid_no is
It is possible to perform correction with higher accuracy than in the case of 1.
is there.

【0054】上記したように、本実施例では、変数gr
id_noには0〜2の値が代入され、それに代入され
る値が大きくなるにつれて、ブロックサイズが小さく段
階的に変更される。このように、複数のブロックサイズ
を用意したことをブロックサイズの階層化と定義し、ブ
ロックサイズを階層化させたワープタイプ動き補償予測
を階層型ワープタイプ動き補償予測と定義する。また、
各階層については、例えば変数grid_noの値が0
であれば階層0というように、変数grid_noの値
を用いて表現することにする。
As described above, in this embodiment, the variable gr
A value of 0 to 2 is assigned to id_no, and as the value assigned to it increases, the block size decreases and is changed stepwise. In this way, the provision of a plurality of block sizes is defined as block size hierarchization, and the warp type motion compensation prediction in which the block sizes are hierarchized is defined as hierarchical warp type motion compensation prediction. Also,
For each layer, for example, the value of the variable grid_no is 0
In this case, the value of the variable grid_no will be used for the expression such as hierarchy 0.

【0055】図2の説明に戻り、ステップ201に続く
ステップ202以降の処理について説明する。ステップ
202では、現在設定されている前フレーム上の変動点
を移動させながら現フレームの画像との対比を行うこと
で、前フレーム上の各変動点の誤差最小位置をそれぞれ
検出し、それぞれ検出した誤差最小位置を各変動点に設
定した際のフレーム間の誤差を算出する誤差算出処理を
実行する。このときのフレーム間の誤差とは、現フレー
ムと、変動点に検出した誤差最小位置を設定して補償を
行った前フレームとの間の全体の誤差である(以降、特
に断らない限り、フレーム間での誤差と記載した場合は
補償後の前フレームと現フレームの間での誤差のことで
あるとする)。その後、ステップ203の処理に移行す
る。この誤差算出処理の詳細は後述する。
Returning to the description of FIG. 2, the processing of step 202 and subsequent steps following step 201 will be described. In step 202, by moving the currently set variation point on the previous frame and comparing it with the image of the current frame, the minimum error position of each variation point on the previous frame is detected and detected respectively. An error calculation process for calculating an error between frames when the minimum error position is set at each variation point is executed. The error between frames at this time is the total error between the current frame and the previous frame that is compensated by setting the minimum error position detected at the variation point (hereinafter, unless otherwise specified, the frame In the case of describing as the error between the frames, it means the error between the previous frame and the current frame after compensation). Then, the process proceeds to step 203. Details of this error calculation processing will be described later.

【0056】ステップ203では、上記ステップ202
の誤差処理算出処理を実行することで得られたフレーム
間の誤差が十分小さいか否か、及び変数grid_no
の値が2であるか否か判定する。フレーム間の誤差が十
分小さいか否かは、その誤差が予め定めた許容範囲内で
あるか否かによって判定する。フレーム間の誤差が許容
範囲内、或いは変数grid_noの値が2であった場
合、その判定はYESとなって一連の処理を終了する。
そうでない場合、その判定はNOとなってステップ20
4の処理に移行する。
In step 203, the above step 202
Whether the inter-frame error obtained by executing the error process calculation process of is not sufficiently small, and the variable grid_no
It is determined whether the value of is 2. Whether or not the error between frames is sufficiently small is determined by whether or not the error is within a predetermined allowable range. If the error between the frames is within the allowable range or the value of the variable grid_no is 2, the determination is YES and the series of processes is ended.
Otherwise, the determination is no and step 20.
The process shifts to the process of No. 4.

【0057】ステップ204では、変数grid_no
の値をインクリメントする。変数grid_noの値を
インクリメントすると、ステップ202の誤差算出処理
に戻る。この場合、ステップ202の誤差算出処理で
は、変数grid_noの値をインクリメントさせたこ
とで新たに追加された変動点の誤差最小位置の検出を行
い、フレーム間の誤差を算出する。
In step 204, the variable grid_no is changed.
Increments the value of. When the value of the variable grid_no is incremented, the process returns to the error calculation process of step 202. In this case, in the error calculation process of step 202, the minimum error position of the variable point newly added by incrementing the value of the variable grid_no is detected, and the error between frames is calculated.

【0058】このように、フレーム間の誤差が許容範囲
内に収まるようにブロックサイズが逐次変更、即ち階層
が変更される。これにより、フレーム毎の圧縮率の低下
を抑えることができる。
In this way, the block size is sequentially changed, that is, the hierarchy is changed so that the error between frames falls within the allowable range. As a result, it is possible to suppress a decrease in the compression rate for each frame.

【0059】上述した動き検出処理では、フレーム間で
画像が大きく異なる場合、最終的に設定されたブロック
サイズは小さく、変動点の数も多いことから、動き検出
処理で実行する計算量は多くなる。しかし、フレーム間
で画像が似ている場合、即ちブロックサイズが大きくと
もその間の誤差が小さい場合、ブロックサイズは変更せ
ず、変動点の数は少ないままなので、その計算量も少な
いままである。このため、フレーム間の誤差の大きさに
より必要に応じて階層を変更させることで、フレーム単
位での計算量を全体として軽減させることができる。即
ち負荷の大きさを抑えつつ、圧縮率の低下を回避するこ
とができる。
In the above-described motion detection processing, when the images differ greatly between frames, the finally set block size is small and the number of fluctuation points is large, so the amount of calculation executed in the motion detection processing is large. . However, when the images are similar between frames, that is, when the block size is large and the error between them is small, the block size is not changed and the number of fluctuation points remains small, so that the calculation amount also remains small. Therefore, by changing the hierarchy as needed according to the magnitude of the error between the frames, it is possible to reduce the amount of calculation in units of frames as a whole. That is, it is possible to prevent the compression rate from decreasing while suppressing the magnitude of the load.

【0060】次に、上記ステップ202の誤差算出処理
について、図4に示すその動作フローチャートを参照し
て説明する。先ず、ステップ401では、変数grid
_noの値が示す階層で新たに追加した変動点に最初に
設定する座標位置(基準位置)を計算する。このステッ
プ401では、変数grid_noの値が0であった場
合、前フレームと現フレーム間の物体の全体的な動きの
検出が行われる。この動きの検出は、画面上の物体(本
システムの用途から、主に人である)の移動(シフト)
量、即ち動きベクトル量を検出するものである。
Next, the error calculation processing in step 202 will be described with reference to the operation flowchart shown in FIG. First, in step 401, the variable grid
The coordinate position (reference position) initially set at the newly added variation point in the hierarchy indicated by the value of _no is calculated. In this step 401, when the value of the variable grid_no is 0, the overall movement of the object between the previous frame and the current frame is detected. This movement is detected by moving (shifting) an object on the screen (mainly a person from the use of this system).
The amount, that is, the amount of motion vector is detected.

【0061】動きベクトル量の検出は、例えば前フレー
ムで注目するマクロブロック(図3(a)に示す複数の
ブロックの集合体)を定め、該マクロブロックをxy方
向に移動させながら、現フレーム上のそれに対応する領
域と対比し、最も一致する移動量を見つけることで行
う。マクロブロックの移動量の検出は、画像の転送レー
トにもよるが、例えば元の位置を基準としてxy方向と
もに±15画素の範囲で行う。動きベクトル量を検出す
ることにより、現フレーム上の各ブロックに対応する前
フレーム上のブロックの位置、即ち図3(a)に示す各
変動点のフレーム間における位置(座標)の対応が確定
する。
The motion vector amount is detected by, for example, defining a macroblock of interest (aggregation of a plurality of blocks shown in FIG. 3A) in the previous frame, and moving the macroblock in the xy direction while moving the macroblock on the current frame. This is done by finding the best matching movement amount by comparing with the area corresponding to that. The amount of movement of the macro block is detected within a range of ± 15 pixels in both the xy directions with respect to the original position, although it depends on the image transfer rate. By detecting the motion vector amount, the position of the block on the previous frame corresponding to each block on the current frame, that is, the correspondence of the position (coordinates) between the frames of each variation point shown in FIG. .

【0062】一方、変数grid_noの値が0でない
場合、追加させる各変動点の初期設定されている座標位
置に、上記検出した動きベクトル量に応じた補償を行う
ことにより、各変動点の基準位置を計算する。
On the other hand, when the value of the variable grid_no is not 0, the reference position of each fluctuation point is compensated for by the compensation according to the detected motion vector amount at the coordinate position which is initially set for each fluctuation point to be added. To calculate.

【0063】ステップ401に続くステップ402で
は、前フレーム上に新たに追加した変動点を移動させる
度に、変動点の移動によって変形した領域を現フレーム
の対応する領域と対比していくことにより、前フレーム
上の新たに追加した各変動点の誤差最小位置を検出する
誤差最小位置検出処理を実行する。この誤差最小位置検
出処理が終了後、ステップ403の処理に移行する。誤
差最小位置検出処理の詳細については後述する。
In step 402 following step 401, each time the newly added fluctuation point is moved on the previous frame, the area deformed by the movement of the fluctuation point is compared with the corresponding area of the current frame. A minimum error position detection process for detecting the minimum error position of each newly added fluctuation point on the previous frame is executed. After this minimum error position detection process is completed, the process proceeds to step 403. Details of the minimum error position detection processing will be described later.

【0064】ステップ403では、上記ステップ402
で検出した誤差最小位置に各変動点の座標位置を設定し
たときの、各変動点の移動によって変形する各ブロック
毎のフレーム間の誤差を合計する。ブロックの補償(投
影)方法によって多少異なるが、このときのブロックの
フレーム間の誤差は、そのブロックの境界を示す全ての
変動点に誤差最小位置を設定した際に求められた誤差で
あり、この誤差の合計がフレーム間の誤差である。この
フレーム間の誤差を算出した後、一連の処理を終了して
図2のステップ203の処理に移行する。
In step 403, the above step 402
When the coordinate position of each fluctuation point is set to the minimum error position detected in step 3, the error between the frames of each block deformed by the movement of each fluctuation point is summed. The error between the frames of the block at this time is an error obtained when the minimum error positions are set at all the fluctuation points indicating the boundaries of the block, though it is slightly different depending on the block compensation (projection) method. The sum of the errors is the error between the frames. After calculating the error between the frames, the series of processes is terminated and the process proceeds to step 203 in FIG.

【0065】次に、上記ステップ402の誤差最小位置
検出処理について、図5に示すその動作フローチャー
ト、図6、及び図7に示す説明図を参照して説明する。
この誤差最小位置検出処理は、上述したように、変数g
rid_noの値の変更に伴って新たに追加(0を代入
した場合も変動点の追加に該当する)した前フレーム上
の変動点を、図4のステップ401で計算したその基準
位置を中心に移動させ、該変動点の移動によって変形し
た領域をフレーム間で対応させて比較していくことによ
り、各変動点毎に誤差最小位置の検出を行う処理であ
る。
Next, the minimum error position detection processing in step 402 will be described with reference to the operation flowchart shown in FIG. 5 and the explanatory diagrams shown in FIGS. 6 and 7.
This minimum error position detection processing is performed by the variable g as described above.
Move the variable point on the previous frame that is newly added (corresponding to the addition of the variable point even when 0 is substituted) with the change of the value of rid_no around the reference position calculated in step 401 of FIG. In this process, the minimum error position is detected for each fluctuation point by comparing the regions deformed by the movement of the fluctuation point between frames.

【0066】先ず、ステップ501では、新たに追加し
た変動点のなかから直目する変動点を設定する。続くス
テップ502では、この着目した変動点を予め定めた順
序に従って移動させる。この変動点の移動は、その基準
位置を中心にして、例えばxy方向ともに±3画素の範
囲である。変動点の移動が終了した後、ステップ503
の処理に移行する。
First, in step 501, a variable point to be aimed at is set from the newly added variable points. In the following step 502, the focused variation point is moved in a predetermined order. The movement of the fluctuation point is within a range of ± 3 pixels in the xy direction with the reference position as the center. After the movement of the change point is completed, step 503
Move to the processing of.

【0067】ステップ503では、現フレームの位置に
対応する、前フレームの移動させた変動点周辺に位置す
る画素の座標位置を計算し、その画素値を算出する。続
くステップ504では、上記ステップ503の処理を実
行することにより得た変動点周辺に位置する座標位置
(画素)の画素値を、現フレームの対応する座標位置
(画素)の画素値と対比してその誤差を算出する。ここ
での誤差とは、変動点の移動により変形した領域内全て
の画素を比較させて得られる画素毎の画素値の差分を累
算した値である。
In step 503, the coordinate position of the pixel located around the moved variation point of the previous frame, which corresponds to the position of the current frame, is calculated, and the pixel value thereof is calculated. In the following step 504, the pixel value of the coordinate position (pixel) located around the variation point obtained by executing the process of step 503 is compared with the pixel value of the corresponding coordinate position (pixel) of the current frame. The error is calculated. The error here is a value obtained by accumulating the differences in pixel value for each pixel obtained by comparing all the pixels in the area deformed by the movement of the fluctuation point.

【0068】ここで、上記ステップ503、及び504
の処理について更に説明する。図6は、変動点の移動に
伴って座標位置が変化する領域を説明する図であり、変
数grid_noの値毎に、即ち各階層毎にその領域を
斜線で表す。着目している変動点は、図6(a)ではa
0 、同図(b)ではb0 、同図(c)ではc4であり、
これらの変動点は○で示す。
Here, the above steps 503 and 504.
The process will be further described. FIG. 6 is a diagram for explaining a region in which the coordinate position changes with the movement of the variation point, and the region is indicated by diagonal lines for each value of the variable grid_no, that is, for each layer. The variation point of interest is a in FIG.
0 , b 0 in the figure (b), c 4 in the figure (c),
These fluctuation points are indicated by ○.

【0069】図6(a)に示すように、変数grid_
noの値が0の場合、変動点a0 の座標位置を移動させ
ると、これに伴ってその周辺の変動点で囲まれる領域
(8角形)a2 3 4 1 8 9 0 1 が変形す
る。この領域は、変動点a0 を移動させる度にフレーム
間で対比され、各画素毎にその画素値の差分をとって累
算した値が誤差として算出される。この算出した誤差が
最も小さくなる座標位置が誤差最小位置として検出され
る。
As shown in FIG. 6A, the variable grid_
When the value of no is 0, when the coordinate position of the variation point a 0 is moved, the area (octagon) surrounded by the variation points a 2 a 3 a 4 a 1 a 8 a 9 a 0 a 1 is deformed. This area is compared between frames every time the variation point a 0 is moved, and a value obtained by taking the difference between the pixel values for each pixel is calculated as an error. The coordinate position where the calculated error is the smallest is detected as the minimum error position.

【0070】変数grid_noの値が1の場合には、
上述したように、変数grid_noの値が0のときに
形成されるブロック内に変動点が追加される。このた
め、図6(b)に示すように、変動点b0 の座標位置を
移動させることで領域(ブロック)a2 3 0 1
変形する。
When the value of the variable grid_no is 1,
As described above, the variation point is added in the block formed when the value of the variable grid_no is 0. Therefore, as shown in FIG. 6B, the region (block) a 2 a 3 a 0 a 1 is deformed by moving the coordinate position of the variation point b 0 .

【0071】変数grid_noの値が2の場合、変数
grid_noの値が1の場合と同様に、変数grid
_noの値が1のときに形成されるブロック内に変動点
が追加される。このため、図6(c)に示すように、変
動点c4 の移動によって領域b0 3 1 0 が変形す
る。
When the value of the variable grid_no is 2, the variable grid_no is the same as when the value of the variable grid_no is 1.
A variation point is added in the block formed when the value of _no is 1. Therefore, as shown in FIG. 6C, the region b 0 a 3 b 1 a 0 is deformed by the movement of the variation point c 4 .

【0072】変数grid_noの値が0の場合には、
そのときに設定されている変動点は全て着目され、それ
ぞれ最小座標位置の検出・設定が行われる。しかし、そ
れ以外の場合、即ち変数grid_noの値が1、及び
2の場合には、新たに追加した変動点の誤差最小位置の
検出・設定だけが行われる。例えば、図6(c)に示す
変動点のなかでは、変動点c4 だけが着目され、その誤
差最小位置の検出・設定が行われる。
When the value of the variable grid_no is 0,
All the changing points set at that time are focused, and the minimum coordinate position is detected and set, respectively. However, in other cases, that is, when the values of the variable grid_no are 1 and 2, only the minimum error position of the newly added fluctuation point is detected and set. For example, among the variation points shown in FIG. 6C, only the variation point c 4 is focused on, and the minimum error position is detected and set.

【0073】変数grid_noの値が1、及び2の場
合、新たに追加される変動点の座標位置はそれまでに形
状が決定されているブロック内である。ブロック内に追
加した変動点を移動させてもそのブロックの境界自体は
変形せず、その内部だけが変化する。本実施例による階
層化では、このことから判るように、最初に大きなサイ
ズのブロックでおおよその補償を行った後、フレーム間
の誤差に応じて、その誤差が許容範囲内に収まるように
ブロック内を順次より細分化させて補償するようにして
いる。これにより、階層を変更させても、各変動点の誤
差最小位置の検出はそれぞれ1度だけとなっている。
When the values of the variable grid_no are 1 and 2, the coordinate position of the variable point newly added is within the block whose shape has been determined by then. Even if the variation point added in the block is moved, the boundary of the block is not deformed, but only the inside is changed. As can be seen from the above, in the layering according to the present embodiment, after roughly compensating a large-sized block first, according to the error between the frames, the error is kept within the allowable range within the block. Are sequentially subdivided to compensate. As a result, even if the hierarchy is changed, the minimum error position of each fluctuation point is detected only once.

【0074】このように、階層の変更に伴って変動点の
誤差最小位置の検出を重複させずにブロックサイズを小
さくさせていき、フレーム間の誤差が許容範囲内に収ま
った時点でブロックの細分化を打ち切る。不要なブロッ
クサイズの変更を回避し、また、変動点の誤差最小位置
の検出の重複を回避させたことにより、計算量をより抑
えつつ、高い圧縮率を維持することができる。圧縮率の
変動自体を抑えることも可能である。
As described above, the block size is reduced without overlapping the detection of the minimum error position of the variation point with the change of the hierarchy, and when the error between the frames falls within the allowable range, the block is subdivided. End the transformation. By avoiding unnecessary change of the block size and avoiding duplication of detection of the minimum error position of the variation point, it is possible to maintain a high compression rate while further suppressing the calculation amount. It is also possible to suppress the fluctuation of the compression rate itself.

【0075】ブロックの変形に伴ってフレーム間の対応
する座標位置も変化する。ワープタイプ動き補償予測で
は、上記したように、現フレーム上の座標位置を移動さ
せながら、その座標位置に対応するブロックを変形させ
た後の前フレーム上の座標位置を計算し、該計算した座
標位置の画素値を算出していく手法が広く用いられてお
り、本実施例もこの手法を採用している。現フレーム上
の座標位置に対応する前フレーム上の座標位置を計算す
る手法は幾つか知られているが、本実施例では三角型計
算手法(アフィン変換)を用いている。
Corresponding coordinate positions between frames change as the blocks are deformed. In the warp type motion compensation prediction, as described above, while moving the coordinate position on the current frame, the coordinate position on the previous frame after deforming the block corresponding to the coordinate position is calculated, and the calculated coordinate is calculated. A method of calculating the pixel value of the position is widely used, and this embodiment also employs this method. Although there are some known methods for calculating the coordinate position on the previous frame corresponding to the coordinate position on the current frame, a triangular calculation method (affine transformation) is used in this embodiment.

【0076】座標位置は、通常、xy座標で表現され
る。このxy座標は画素の配置に対応、即ちxy座標上
の各座標位置にはそれぞれ1つの画素が1対1に対応す
る。画像(画面)の左上の角が座標位置(0,0)であ
る。三角型計算手法においては、ブロックを3角形に分
割し、例えばその内部の座標位置をベクトルとして扱
う。図7を参照して、この手法による座標変換について
説明する。
The coordinate position is usually expressed by xy coordinates. The xy coordinates correspond to the arrangement of pixels, that is, one pixel corresponds to each coordinate position on the xy coordinates one to one. The upper left corner of the image (screen) is the coordinate position (0,0). In the triangular calculation method, the block is divided into triangles, and the coordinate position inside thereof is treated as a vector. The coordinate conversion by this method will be described with reference to FIG. 7.

【0077】図7(a)は前フレームのブロック、同図
(b)はそのブロックに対応する現フレームのブロック
である。また、図7において、数字を付与した文字は各
変動点のベクトルを表し、上述した約束に従い、その文
字は現フレームでは大文字、前フレームでは小文字とし
ている。ここでは、三角形A0 102 (a0
10 2 )内部の位置ベクトルの変換を例にとって説明す
る。
FIG. 7A is a block of the previous frame, which is shown in FIG.
(B) is a block of the current frame corresponding to the block
It is. Also, in FIG. 7, the letters with numbers are
Represents a vector of change points and follows the
The letters should be uppercase in the current frame and lowercase in the previous frame.
ing. Here, the triangle A0ATenATwo(A0a
Tena Two) The internal position vector conversion will be used as an example.
You.

【0078】上述したように、ワープタイプ動き補償予
測では、座標変換はアフィン変換を仮定している。この
ため、三角形A0 102 内の任意の位置ベクトルXに
対応する三角形a0 102 内の位置ベクトルxとの関
係は、x=TX+kと書ける。ここで、Tはパラメー
タ、kは移動量(定数)である。フレーム間の各変動点
の位置は対応するから、これらの間の関係も以下のよう
に書ける。
As described above, in warp type motion compensation prediction, the coordinate transformation is assumed to be an affine transformation. Therefore, the relationship with the position vector x in the triangle a 0 a 10 a 2 corresponding to the arbitrary position vector X in the triangle A 0 A 10 A 2 can be written as x = TX + k. Here, T is a parameter and k is a movement amount (constant). Since the positions of the fluctuation points between frames correspond to each other, the relationship between them can also be written as follows.

【0079】[0079]

【数1】 a0 =TA0 +k ・・・・1式 a10=TA10+k ・・・・2式 a2 =TA2 +k ・・・・3式 1式−2式、2式−3式より、 a0 −a10=T(A0 −A10) ・・・・4式 a10−a2 =T(A10−A2 ) ・・・・5式 また、4式、及び5式より、 (a0 −a10,a10−a2 )=T(A0 −A10,A10
2 ) ゆえに、 T=(a0 −a10,a10−a2 )(A0 −A10,A10
2 -1 一方のkは、Tを1式に代入して、 k=a0 −(a0 −a10,a10−a2 )(A0 −A10
10−A2 -10 よって、図7の例における位置ベクトルxとXの関係
は、 x=(a0 −a10,a10−a2 )(A0 −A10,A10
2 -1X+a0 −(a0 −a10,a10−a2 )(A0
−A10,A10−A2 -10 である。
[Formula 1] a 0 = TA 0 + k ··· 1 formula a 10 = TA 10 + k ··· 2 formulas a 2 = TA 2 + k ··· 3 formulas 1 −2 formulas, 2 −3 formulas From the formula, a 0 −a 10 = T (A 0 −A 10 ) ··· 4 formula a 10 −a 2 = T (A 10 −A 2 ) ·· 5 formula Further, 4 formula and 5 From the equation, (a 0 −a 10 , a 10 −a 2 ) = T (A 0 −A 10 , A 10
A 2 ) Therefore, T = (a 0 −a 10 , a 10 −a 2 ) (A 0 −A 10 , A 10
A 2 ) −1 One k is obtained by substituting T into equation 1 and k = a 0 − (a 0 −a 10 , a 10 −a 2 ) (A 0 −A 10 ,
A 10 −A 2 ) −1 A 0 Therefore, the relationship between the position vectors x and X in the example of FIG. 7 is as follows: x = (a 0 −a 10 , a 10 −a 2 ) (A 0 −A 10 , A 10
A 2) -1 X + a 0 - (a 0 -a 10, a 10 -a 2) (A 0
-A 10, A 10 -A 2) is -1 A 0.

【0080】このようにして現フレーム上の位置ベクト
ルXに対応する前フレーム上の位置ベクトルxが求ま
る。通常、整数で表現される位置ベクトルXとは異な
り、この求めた位置ベクトルxのxy成分はともに整数
ではなく、実数となる。このため、位置ベクトル(座標
位置)xの各成分の小数部の値に応じて、位置ベクトル
xの周辺画素の間でその画素値の補間計算を行い、その
計算結果を位置ベクトル(座標位置)xの画素値とす
る。
In this way, the position vector x on the previous frame corresponding to the position vector X on the current frame is obtained. Normally, unlike the position vector X represented by an integer, both the xy components of the obtained position vector x are real numbers instead of integers. Therefore, according to the value of the decimal part of each component of the position vector (coordinate position) x, interpolation calculation of the pixel value is performed between the peripheral pixels of the position vector x, and the calculation result is the position vector (coordinate position). Let x be the pixel value.

【0081】位置ベクトルxの座標位置を(x,y)、
座標位置(x,y)周辺の各座標位置を各々(x0 ,y
0 )、(x0 +1,y0 )、(x0 ,y0 +1)、及び
(x 0 +1,y0 +1)とし、各座標位置での画素値は
その座標位置にpを付けて表す。各座標位置の関係とし
ては、x0 ≦x≦x0 +1、y0 ≦y≦y0 +1であ
る。このように仮定した場合の補間計算は、例えば以下
のように行う。
The coordinate position of the position vector x is (x, y),
Each coordinate position around the coordinate position (x, y) is (x0, Y
0), (X0+1, y0), (X0, Y0+1), and
(X 0+1, y0+1), and the pixel value at each coordinate position is
It is shown by adding p to the coordinate position. As the relationship of each coordinate position
Is x0≦ x ≦ x0+1, y0≤ y ≤ y0At +1
You. Interpolation calculation under such an assumption is as follows.
Like.

【0082】[0082]

【数2】 t0 =(x0 +1−x)・p(x0 ,y0 ) +(x−x0 )・p(x0 +1,y0 ) t1 =(x0 +1−x)・(x0 ,y0 +1) +(x−x0 )・p(x0 +1,y0 +1) p(x,y)=(y0 +1−y)・t0 +(y−y0
・t1 このようにして、現フレーム上の座標位置に対応するブ
ロックを変形させた後の前フレーム上の座標位置が算出
され、その座標位置に該当する画素値が補間演算によっ
て算出される。
[Number 2] t 0 = (x 0 + 1 -x) · p (x 0, y 0) + (x-x 0) · p (x 0 + 1, y 0) t 1 = (x 0 + 1-x) · (x 0, y 0 +1 ) + (x-x 0) · p (x 0 + 1, y 0 +1) p (x, y) = (y 0 + 1-y) · t 0 + (y-y 0 )
T 1 In this way, the coordinate position on the previous frame after the block corresponding to the coordinate position on the current frame is deformed is calculated, and the pixel value corresponding to the coordinate position is calculated by the interpolation calculation.

【0083】前フレーム上の座標位置、及びその画素値
は、移動させた変動点によって変形する領域を単位とし
て算出される。前フレーム上のこの領域内各座標位置の
画素値を算出すると、各座標位置毎にフレーム間の画素
値の差分をとり、累算する。この差分の累算した値がそ
の領域のフレーム間の誤差である。この誤差を算出する
ことでステップ504の処理は終了し、ステップ505
の処理に移行する。
The coordinate position on the previous frame and its pixel value are calculated in units of the area deformed by the moved variation point. When the pixel value at each coordinate position in this area on the previous frame is calculated, the difference in pixel value between frames is taken for each coordinate position and accumulated. The accumulated value of this difference is the error between the frames of the area. By calculating this error, the process of step 504 ends, and step 505
Move to the processing of.

【0084】ステップ504に続くステップ505で
は、現在着目している変動点の移動が全て終了したか否
か判定する。上記したように、本実施例では予め設定し
た範囲内に変動点の移動を限定しており、その範囲内全
ての座標位置に変動点を移動させた場合、その判定はY
ESとなってステップ506の処理に移行する。反対に
そうでない場合、その判定はNOとなってステップ50
2の処理に戻る。
In step 505 following step 504, it is determined whether or not the movement of the fluctuation point of interest is completed. As described above, in the present embodiment, the movement of the variation point is limited within the preset range, and when the variation point is moved to all coordinate positions within the range, the determination is Y.
It becomes ES and shifts to the processing of step 506. On the other hand, if not, the determination is no and step 50.
It returns to the process of 2.

【0085】ステップ506では、変動点を移動させた
なかで誤差が最小となる座標位置(誤差最小位置)を検
索し、この検索した座標位置をこの変動点の座標位置に
設定する。その後、ステップ507において、現在対象
としている全ての変動点で誤差最小位置を設定したか否
か判定する。座標位置を設定する変動点がまだ残ってい
る場合、その判定はNOとなってステップ501の処理
に戻り、ここで着目する変動点を新たに設定した後、こ
れ以降の処理を行う。全ての変動点に対して座標位置を
再定義した場合、その判定はYESとなって一連の処理
を終了し、図2のステップ203の処理に移行する。
In step 506, the coordinate position where the error is minimized while moving the variation point (minimum error position) is searched, and the retrieved coordinate position is set as the coordinate position of this variation point. After that, in step 507, it is determined whether or not the minimum error positions have been set at all the current fluctuation points. When the variation point for setting the coordinate position still remains, the determination becomes NO and the process returns to the process of step 501. After the variation point of interest is newly set here, the subsequent processes are performed. When the coordinate positions are redefined for all the variation points, the determination is YES and the series of processes is ended, and the process proceeds to step 203 in FIG.

【0086】このように、着目した変動点を随時移動さ
せ、この移動が終了次第、着目する変動点を変更してい
くことで、誤差が最小になる座標位置が各変動点に設定
されていくことになる。なお、各変動点に新たに設定さ
れた座標位置(誤差最小位置)は、例えばその最初の座
標位置(基準位置)からの変位ベクトルの形で受信側に
送られる。一方の受信側では、送信側から送られた動き
ベクトル量に従って前フレームの画像をシフトした後、
各変動点毎の変位ベクトルに応じて各変動点の座標位置
を修正することにより各ブロックの補償を行う。
As described above, the focus point is moved at any time, and the focus point is changed as soon as the movement is completed, whereby the coordinate position where the error is minimized is set to each focus point. It will be. The coordinate position (minimum error position) newly set at each variation point is sent to the receiving side in the form of a displacement vector from the first coordinate position (reference position), for example. On the one receiving side, after shifting the image of the previous frame according to the motion vector amount sent from the transmitting side,
Each block is compensated by correcting the coordinate position of each variation point according to the displacement vector of each variation point.

【0087】なお、ワープタイプ動き補償予測では、各
変動点の誤差最小位置の検出を繰り返し行うようにして
いるが、本実施例ではこの繰り返しを行っていない。こ
れは、主に、ブロックサイズを必要に応じて小さくして
いくさせていくことから、このような繰り返しを行わな
くとも発生符号量を効率的に小さくすることができ、圧
縮率の低下は避けられると考えられるためである。しか
し、発生符号量をより確実に小さくさせたいような場
合、各変動点の誤差最小位置の検出を、例えばブロック
サイズを最も小さくさせてもフレーム間の誤差が許容範
囲外であった場合に繰り返させるようにしてもよい。
In the warp-type motion compensation prediction, the minimum error position of each variation point is repeatedly detected, but this repetition is not performed in this embodiment. This is mainly because the block size is made smaller as necessary, so that the generated code amount can be efficiently reduced without performing such repetition, and a reduction in compression rate can be avoided. This is because it is considered that it will be done. However, when it is desired to reduce the generated code amount more surely, the detection of the minimum error position of each fluctuation point is repeated, for example, when the error between frames is out of the allowable range even if the block size is minimized. You may do it.

【0088】また、本実施例では、フレーム間の全体の
誤差が許容範囲内でなかった場合に階層を変更させてブ
ロックサイズを全体的に小さくさせているが、フレーム
(画像)を幾つかの部分に分け、各部分毎に階層を変更
させるようにしてもよい。これにより、フレーム間の誤
差が大きい部分だけブロックサイズを小さく設定してい
くことでその誤差を小さくすることができるとともに、
その他の誤差が小さい部分については不要な計算を回避
することができる。このため、圧縮率の低下を回避させ
るための負荷をより軽減することができる。
Further, in this embodiment, when the total error between frames is not within the allowable range, the hierarchy is changed to reduce the block size as a whole, but some frames (images) are It may be divided into parts and the hierarchy may be changed for each part. This makes it possible to reduce the error by setting the block size to a small value only in the part where the error between frames is large,
Unnecessary calculation can be avoided for other small errors. Therefore, it is possible to further reduce the load for avoiding the reduction of the compression rate.

【0089】ところで、ブロックサイズは、そのサイズ
が小さくなる程計算量は増加するという不具合がある一
方、発生符号量は小さくなるという利点がある。本発明
は、ブロックサイズを階層化することにより、動き補償
予測における計算量、発生符号量(圧縮量)の両方を制
御することができる。即ち、発生符号量の低減に重点を
おいた場合にはブロックサイズを小さく設定しておき、
高速な処理速度に重点をおく場合にはブロックサイズを
大きく設定しておけばよく、重点とする内容に応じて柔
軟に適用することができる。
By the way, the block size has a disadvantage that the calculation amount increases as the size decreases, but the generated code amount decreases. The present invention can control both the calculation amount and the generated code amount (compression amount) in motion compensation prediction by layering block sizes. That is, when the emphasis is placed on the reduction of the generated code amount, the block size is set small,
When focusing on high-speed processing speed, a large block size may be set, and the block size can be flexibly applied according to the content to be focused on.

【0090】最近では、CPUの性能の急激な向上によ
り、例えばこれまで専用のDSPに実行させていた処理
をCPUに実行させることでこのDSPを不要とし、シ
ステムの簡易化を図ることが考えられてきている。本発
明は、動き補償予測における処理の負担を制御するもの
であることから、このようなシステムの簡易化にも貢献
できる。
In recent years, due to the rapid improvement in the performance of the CPU, it is conceivable that the DSP can be made unnecessary and the system can be simplified by, for example, causing the CPU to execute the processing that was previously executed by the dedicated DSP. Is coming. Since the present invention controls the processing load in motion compensation prediction, it can also contribute to simplification of such a system.

【0091】[0091]

【発明の効果】以上説明したように本発明は、ブロック
サイズを階層化したため、ワープタイプ動き補償予測を
行う際の負荷の重さ、及び圧縮率の両方を制御すること
ができる。
As described above, according to the present invention, since the block size is hierarchized, it is possible to control both the weight of the load and the compression rate when performing the warp type motion compensation prediction.

【0092】また、補償を行った一方の画像と他方の画
像間の画像情報の誤差が許容範囲内に収まるように、ブ
ロックサイズを順次小さく設定していくため、高い圧縮
率に維持することができるとともに、予測に要する計算
量を抑えることができる。
Further, since the block sizes are successively set to be small so that the error of the image information between the one image and the other image subjected to the compensation falls within the allowable range, it is possible to maintain a high compression rate. In addition, the amount of calculation required for prediction can be suppressed.

【0093】さらには、既に配置されている変動点に新
たに変動点を追加することでブロックサイズの大きさの
変更を行うため、既に誤差最小位置の設定が行われた変
動点についてはそれを利用することができる。これによ
り、ブロックサイズの変更に伴って新たに実行する計算
量を少なく抑えることができ、負荷をより軽減すること
ができる。
Furthermore, since the size of the block size is changed by newly adding a changing point to the already arranged changing point, the changing point is already set for the changing point for which the minimum error position has been set. Can be used. As a result, it is possible to reduce the amount of calculation that is newly executed in accordance with the change in the block size, and it is possible to further reduce the load.

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

【図1】本発明による実施例を採用したシステムのブロ
ック図である。
FIG. 1 is a block diagram of a system that employs an embodiment according to the present invention.

【図2】動き検出処理の動作フローチャートである。FIG. 2 is an operation flowchart of motion detection processing.

【図3】各階層毎に設定される変動点の基準位置を説明
する図である。
FIG. 3 is a diagram illustrating a reference position of a variation point set for each layer.

【図4】誤差算出処理の動作フローチャートである。FIG. 4 is an operation flowchart of error calculation processing.

【図5】誤差最小位置検出処理の動作フローチャートで
ある。
FIG. 5 is an operation flowchart of minimum error position detection processing.

【図6】変動点の移動に伴って座標位置が変化する領域
を説明する図である。
FIG. 6 is a diagram illustrating an area in which a coordinate position changes as a variation point moves.

【図7】座標変換を説明するための図である。FIG. 7 is a diagram for explaining coordinate conversion.

【図8】一般的な動き補償予測による画像のシフト例を
示す図である。
[Fig. 8] Fig. 8 is a diagram illustrating an example of image shift based on general motion compensation prediction.

【図9】ワープタイプ動き補償予測を説明する図であ
る。
[Fig. 9] Fig. 9 is a diagram for describing warp-type motion-compensated prediction.

【図10】実際の変動点の状態を説明する図である。FIG. 10 is a diagram illustrating a state of an actual fluctuation point.

【図11】変動点の移動に伴うブロックの形状変化例を
示す図である。
FIG. 11 is a diagram showing an example of a change in the shape of a block due to the movement of a change point.

【図12】ワープタイプ動き補償予測における投影方法
を説明する図である。
FIG. 12 is a diagram illustrating a projection method in warp type motion compensation prediction.

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

101 画像入力装置 103 動き検出器 110 フレーム・メモリ 111 動き補償器 101 image input device 103 motion detector 110 frame memory 111 motion compensator

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 2つの画像上に、指定されたブロックサ
イズに応じて、ブロック領域の境界を示す変動点をそれ
ぞれ対応させて配置し、 前記2つの画像の一方の画像上に配置された変動点を移
動させることによって変形させたブロック領域を、その
元の形状に投影させた状態を求めることで補償を行い、 該補償したブロック領域と前記2つの画像の他方の画像
上の対応するブロック領域との間の画像情報の誤差を算
出し、 該算出した誤差が最小となる誤差最小位置を各変動点毎
に設定する、 ことを特徴とする階層型ワープタイプ動き補償予測方
法。
1. Fluctuations arranged on one of the two images by arranging fluctuation points indicating boundaries of block areas in correspondence with each other according to a designated block size. Compensation is performed by obtaining the state in which the block area deformed by moving the points is projected to its original shape, and the compensated block area and the corresponding block area on the other image of the two images. And a minimum error position at which the calculated error is minimized is set for each variation point. A hierarchical warp-type motion compensation prediction method.
【請求項2】 2つの画像上に、指定されたブロックサ
イズに応じて、ブロック領域の境界を示す変動点をそれ
ぞれ対応させて配置し、 前記2つの画像の一方の画像上に配置された変動点を移
動させることによって変形させたブロック領域を、その
元の形状に投影させた状態を求めることで補償を行い、 該補償したブロック領域と前記2つの画像の他方の画像
上の対応するブロック領域との間の画像情報の誤差を算
出し、 該算出した誤差が最小となる誤差最小位置を各変動点毎
に設定し、 該誤差最小位置を各変動点にそれぞれ設定して各ブロッ
ク領域の補償を行うことで得られる前記一方の画像を、
前記他方の画像と比較することで得られる画像情報の誤
差を算出し、 該算出した前記2つの画像間の画像情報の誤差が所定の
許容範囲内であるか否か判定し、 前記2つの画像間の画像情報の誤差が所定の許容範囲内
でなかった場合、現在指定中のブロックサイズよりも小
さいブロックサイズを新たに指定して前記変動点の誤差
最小位置の設定を繰り返させる、 ことを特徴とする階層型ワープタイプ動き補償予測方
法。
2. Fluctuations arranged on one of the two images are arranged so that fluctuation points indicating boundaries of block areas are respectively arranged on the two images in correspondence with each other according to a designated block size. Compensation is performed by obtaining the state in which the block area deformed by moving the points is projected to its original shape, and the compensated block area and the corresponding block area on the other image of the two images. Error in the image information between and is set, the minimum error position where the calculated error is the minimum is set for each variation point, and the minimum error position is set for each variation point to compensate each block area. The above-mentioned one image obtained by performing
An error of the image information obtained by comparing with the other image is calculated, and it is determined whether the calculated error of the image information between the two images is within a predetermined allowable range. If the error in the image information between the two is not within a predetermined allowable range, a block size smaller than the block size currently being specified is newly specified, and the setting of the minimum error position of the fluctuation point is repeated. Hierarchical warp type motion compensated prediction method.
【請求項3】 前記ブロックサイズが新たに指定された
場合において、 前記ブロックサイズは、前記誤差最小位置が設定されて
いる変動点に、新たに変動点を追加することで変更し、 前記誤差最小位置の設定は、前記新たに追加した変動点
に対してのみ行う、 ことを特徴とする請求項2記載の階層型ワープタイプ動
き補償予測方法。
3. When the block size is newly designated, the block size is changed by newly adding a variation point to a variation point where the minimum error position is set, and the minimum error The hierarchical warp type motion compensation prediction method according to claim 2, wherein the position is set only for the newly added variation point.
【請求項4】 2つの画像上に、指定されたブロックサ
イズに応じて、ブロック領域の境界を示す変動点をそれ
ぞれ対応させて配置する変動点配置手段と、 前記2つの画像の一方の画像上に前記変動点配置手段が
配置した変動点を移動させることによって変形させたブ
ロック領域を、その元の形状に投影させた状態を求める
ことで補償を行う補償手段と、 前記補償手段が補償したブロック領域と前記2つの画像
の他方の画像上の対応するブロック領域との間の画像情
報の誤差を算出する領域間誤差算出手段と、 前記領域間誤差算出手段が算出した誤差が最小となる誤
差最小位置を各変動点毎に設定する位置設定手段と、 を具備したことを特徴とする階層型ワープタイプ動き補
償予測装置。
4. A variable point arranging means for arranging variable points indicating boundaries of block areas in correspondence with each other on the two images according to a designated block size, and on one image of the two images. Compensating means for performing compensation by obtaining a state in which the block area deformed by moving the variation point arranged by the variation point arranging means is projected to its original shape, and the block compensated by the compensating means. An inter-region error calculating means for calculating an error in image information between a region and a corresponding block region on the other of the two images, and an error minimum for minimizing an error calculated by the inter-region error calculating means. A hierarchical warp-type motion-compensated prediction apparatus, comprising: position setting means for setting a position for each variation point.
【請求項5】 前記位置設定手段が誤差最小位置を各変
動点にそれぞれ設定し、前記補償手段がその状態から各
ブロック領域の補償を行うことで得られる前記一方の画
像を、前記他方の画像と比較することで得られる前記2
つの画像間の画像情報の誤差を算出する画像間誤差算出
手段と、 前記画像間誤差算出手段が算出した誤差が所定の許容範
囲内か否か判断し、該誤差が前記許容範囲内でないと判
断した場合に、現在指定中のブロックサイズよりも小さ
いブロックサイズを新たに指定し、前記変動点の誤差最
小位置の設定を繰り返させる制御を実行する制御手段
と、 をさらに具備したことを特徴とする請求項4記載の階層
型ワープタイプ動き補償予測装置。
5. The one image obtained by the position setting means setting the minimum error position at each variation point and the compensating means compensating each block area from that state, the other image. 2 obtained by comparing with
An inter-image error calculating means for calculating an error in image information between two images; and determining whether the error calculated by the inter-image error calculating means is within a predetermined allowable range, and determining that the error is not within the allowable range. In this case, a block size smaller than the currently specified block size is newly designated, and control means for executing control to repeat setting of the error minimum position of the variation point is further provided. The hierarchical warp type motion compensation prediction device according to claim 4.
【請求項6】 前記制御手段がブロックサイズを新たに
指定した場合において、 前記変動点配置手段は、前記誤差最小位置が設定されて
いる変動点に、新たに変動点を追加して配置することで
ブロックサイズを変更し、 前記補償手段は、前記新たに配置された変動点のみを着
目してその移動、及び補償を行い、 前記位置設定手段は、前記新たに配置された変動点の誤
差最小位置の設定のみ行う、 ことを特徴とする請求項5記載の階層型ワープタイプ動
き補償予測装置。
6. When the control unit newly designates a block size, the variation point placement unit adds a new variation point to the variation point where the minimum error position is set, and arranges it. The block size is changed with, the compensating unit focuses on only the newly arranged fluctuation point to perform movement and compensation, and the position setting unit minimizes the error of the newly arranged fluctuation point. The hierarchical warp type motion compensation prediction device according to claim 5, wherein only the position is set.
JP7182376A 1995-07-19 1995-07-19 Hierarchical warp type motion compensation predict method and its device Abandoned JPH0937258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7182376A JPH0937258A (en) 1995-07-19 1995-07-19 Hierarchical warp type motion compensation predict method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7182376A JPH0937258A (en) 1995-07-19 1995-07-19 Hierarchical warp type motion compensation predict method and its device

Publications (1)

Publication Number Publication Date
JPH0937258A true JPH0937258A (en) 1997-02-07

Family

ID=16117235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7182376A Abandoned JPH0937258A (en) 1995-07-19 1995-07-19 Hierarchical warp type motion compensation predict method and its device

Country Status (1)

Country Link
JP (1) JPH0937258A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007288727A (en) * 2006-04-20 2007-11-01 Tama Tlo Kk Method and device for encoding motion compensating image
JP2012075088A (en) * 2010-09-03 2012-04-12 Pentax Ricoh Imaging Co Ltd Image processing system and image processing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007288727A (en) * 2006-04-20 2007-11-01 Tama Tlo Kk Method and device for encoding motion compensating image
JP4645515B2 (en) * 2006-04-20 2011-03-09 日本ビクター株式会社 Motion compensated image coding method and motion compensated image coding apparatus
JP2012075088A (en) * 2010-09-03 2012-04-12 Pentax Ricoh Imaging Co Ltd Image processing system and image processing method

Similar Documents

Publication Publication Date Title
JP3269960B2 (en) Post-processing apparatus and method for removing blocking phenomenon
JP3386142B2 (en) Image decoding device and image decoding method
US4849810A (en) Hierarchial encoding method and apparatus for efficiently communicating image sequences
US6785333B2 (en) Motion vector coding method
US5661524A (en) Method and apparatus for motion estimation using trajectory in a digital video encoder
JPH09271026A (en) Image encoding device
JP3655651B2 (en) Data processing device
JP2001112000A (en) Video signal encoding device
JPH08265780A (en) Method and apparatus for coding/decoding video signal
JPH0870460A (en) Movement compensation type coding method adapted to magnitude of movement,and its device
JP3152765B2 (en) Image coding device
JP4709074B2 (en) Moving picture encoding method, apparatus, program thereof, and recording medium recording the program
JPH09182082A (en) Movement compensation prediction encoding method for moving image and device therefor
JPH01179584A (en) Method for searching motion compensating dynamic vector
WO2003056838A1 (en) Moving picture compression/coding apparatus and motion vector detection method
JP4000928B2 (en) Motion compensation device
JPH0937258A (en) Hierarchical warp type motion compensation predict method and its device
JP2002152758A (en) Image coder and image coding method
JP3867346B2 (en) Image signal processing apparatus and method, and prediction parameter learning apparatus and method
JP2004064518A (en) Moving image encoding method and device and its computer program
US6061401A (en) Method and apparatus for selectively encoding/decoding a video signal
JP3728605B2 (en) Warp type motion detection method and warp type motion detection device
JP4021800B2 (en) Moving picture coding apparatus, method, and moving picture coding program
JPH0410788A (en) Method for controlling coding variable of image signal
JPH07177519A (en) Motion vector detection method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050301

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050308

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20050329