Field of the Invention
The present invention relates to a method of motion compensation and elastic deformation in the picture sequences, that is a picture coding method in which the pixel values in a picture are determined using the previous picture. It is assumed that the motion between two successive pictures is known, that is the motion vector field is known. The motion may include both translation and deformation.
State of the Art
It is previously known to use motion vector fields for picture coding. In this connection, the picture is divided into rectangular blocks. In this division problems may occur with visible squares in the picture sequence because of discontinuities at the edges of the block. According to the present invention this problem is solved by dividing the picture in triangles instead and interpolate the motion field.
Summary of the Invention
Thus, the present invention provides a method of motion compensation and elastic deformation in picture sequences in transmission of moving pictures between a transmitter and a receiver. According to the invention each picture in a picture sequence is divided into triangles and the motion between two successive pictures is estimated such that the motion vectors in the corner points of the triangles can be determined. Information about the corner points and/or the motion vectors is transmitted from the transmitter to the receiver. In the receiver the motion vectors of the internal points of the triangles are calculated using the three transmitted motion vectors associated with the respective triangle. The pixel values of the corner points of the respective triangles are calculated using the transmitted motion vectors and the previous picture and the internal pixel values are calculated using the calculated motion vectors and the previous picture.
Further features of the invention are set forth in detail in the accompanying claims.
Brief Description of the Drawings
The drawing is a schematic illustration of two successive pictures in which corresponding triangles have been drawn and the respective motion vectors, in which
FIG. 1. shows translation,
FIG. 2. rotation and
FIG. 3. deformation; and
FIGS. 4A and 4B are flowcharts showing the steps performed in the transmitter and receiver, respectively.
The invention is described below in detail.
Detailed Description of a Preferred Embodiment of the Invention
The purpose of the invention is to enable transmission of picture sequences by starting from one picture and only transmit motion vectors. There already exists methods of dividing the pictures in rectangular blocks and of determining the motion vectors applying within the blocks. A problem is that square blocks then may become visible in the picture because of discontinuities in the motion vector field between adjacent blocks.
According to the present invention the picture is divided into triangles instead. The division may be fixed or may be adapted to the picture in question and the motion therein. When the corner points of each triangle are established the motion vectors in the corner points are determined relative to the previous picture in the sequence. Motion vectors are assigned to points within each triangle by interpolating the motion vectors in the corner points. Thus, contiguous triangles have the same motion vectors along the whole common side. Thereby no discontinuities occur.
The pixel values are obtained from the previous picture using the motion vector fields obtained in this way. Generally, the motion vectors indicate undefined points in the previous picture. The pixel value is then obtained using an interpolation filter, preferably in accordance with our co-pending patent application titled "Method of moving a pixel a subpixel distance".
In the figures, various ways of how a triangle can be moved are shown. FIG. 1 shows a translation, FIG. 2 a rotation and FIG. 3 a deformation, in this case an enlargement. Normally, the movement of the triangle is a combination of these three basic types. The co-ordinates of the new triangle can be expressed in matrix form as
where X.sub.t is the co-ordinates of the old triangle, Y.sub.t is the new triangle and M.sub.t contains the three motion vectors.
Any point (x, y) may be expressed using the position vectors of the triangle X.sub.t. Define a triangle having three corner points ##EQU1## Create a base of vectors v.sub.1, v.sub.2, v.sub.3 using the corner points. ##EQU2## Then an arbitrary point in the picture plane can be expressed as
For points within the triangle X.sub.t the following relations apply 0.ltoreq.a.ltoreq.1 and 0.ltoreq.b.ltoreq.a.
For a given point (x, y ) a and b can be calculated with the formulas ##EQU3##
A set of positions X may be expressed as
where each line of X is a position (x.sub.i, y.sub.i) and ##EQU4##
Several triangles can be processed at the same time with a matrix X.sub.t containing all the triangle corners involved. With a number of corners=nc: ##EQU5##
Then B is modified such that each line has nc positions and the values 1-a.sub.i, a.sub.i -b.sub.i and b.sub.i are placed in the positions corresponding to the corner point that is to be used. All other positions are zero.
A continouos motion vector field in the triangle Y.sub.t is obtained if the motion vectors are calculated as
where the positions in question within the respective triangle are inserted in B.
The triangle division of the picture is performed in the transmitter and the corner points of the triangles are established. Thereafter, the motion vectors and the corner points are established. First, a complete picture is transmitted between the transmitter and receiver. Thereafter, only motion vectors and information about the corner point associated with each motion vector are transmitted. In the receiver the motion vector of every point in the picture is calculated by interpolation of the motion vectors in the corner point (that is by the formula M=BM.sub.t). Thereafter, all the pixel values can be calculated using the motion vectors and the previous picture.
Thus, the present invention provides a method of motion compensation and elastic deformation in picture sequences which solves the above problem with discontinuities between blocks in the picture. The invention is defined in the accompanying claims.