An image encoding device

Abstract: The disclosure presents an image encoding device which changes a position of a partial area in which there are pixels encoded by using only pixels being in the present picture at intervals, or an image encoding device which decides the partial area such that the partial area is a continuous area in a picture. Accordingly, the device efficiently prevents to spread errors, can avoid frequent deteriorations of images, and can improve a quality of encoded images.

Description: FIELD OF THE INVENTION This invention relates to an image encoding device, especially an encoding device which uses a correlation between adjacent pictures (frames or fields) of a video signal. DESCRIPTION OF THE RELATED ART Many systems for encoding digital image information to compress an amount thereof have been proposed in the past. One of the proposed systems is so-called an intra-frame (or field) encoding system and other is so called a inter-frame (or field) encoding system. The intra-frame encoding system is a system which compresses the amount of the data by using characteristics of the image that adjacent pixels usually have a similar brightness and a similar colour. Actual images usually have the major portions which have continuous similar brightness and similar colours. Therefore, it is possible that the compression of one fifth or one tenth is easily executed by using the intra-frame encoding system. The inter-frame encoding system is a system which encodes mainly compensative information by using similarities between adjacent pictures (frame or field). Patterns of adjacent pictures are usually similar except some movements and modifications. By using this matter, the inter-frame encoding system calculates relational information indicating relationships between adjacent pictures. For instance, the relational information includes an information which indicates a motion of the image, a modification of colour information, and a modification of luminance information. "Predictive values" are calculated on the basis of the relational information. In other words, information indicating the most similar images to the image to be encoded are calculated by using information of neighbouring pictures. Then, only information indicating differences between "predictive values" and values of the image to be encoded are encoded. For instance, in case that a person moves right in a motion picture in which there is only the person and a background, "predictive values" for a part of the person in the present picture are formed by values of a part of the person in the preceding picture. The relational information are also encoded together with differential values between the "predictive values" and values of the image to be encoded. When information is compressed by a prior device using a inter-frame encoding system, errors are spread in a direction of time when errors occur. Therefore the prior device normally encodes one picture by using an intra-frame encoding system after a predetermined number of pictures have been encoded by using the inter-frame encoding system. In short, the intra-frame encoding for one picture and the inter-frame encoding for several pictures are alternatively executed. In that case, such intra-frame encoding is called "re-fresh operation". Typically, the amount of data encoded by the intra-frame encoding is about 16-25k bytes per frame, and the amount of data encoded by the inter-frame encoding is about 7-10k bytes per frame. In short, it is known that the amount of data encoded by the intra-frame encoding is more than that encoded by the inter-frame encoding. Therefore, when the intra-frame encoding is executed at regular intervals by using a quantizing step which was previously used by the inter-frame encoding, the amount of data suddenly increases at the intervals. Therefore it is difficult to maintain a uniform transmitting rate and a lot of memory must be provided for this purpose. On the other hand, when the quantizing step is varied to obtain a uniform transmitting rate, there is another problem that the quality of images is frequently degraded. In general, the above mentioned problems occur in the encoding device which uses a correlation between adjacent pictures of the video signal. It is known from EP-A-0434427 to provide an encoding apparatus which encodes different areas of a single frame using intraframe and interframe encoding respectively, a selected block of the frame being intraframe coded in a refresh operation, and the position of the selected block being periodically changed. It is known from US-A-5,057,916 and US-A-4,651,206 to provide refresh cycles and to restrict motion compensation prediction by preventing motion estimation from encompassing an area for which a refresh operation has just been completed in order to avoid data refreshed at the previous cycle being overwritten by unreliable data. It is an object of the invention to provide an improved encoding device. According to the present invention there is disclosed an image encoding apparatus for encoding a motion picture sequence, the apparatus comprising: input means for inputting an image signal; and encoding means for encoding the image signal to compress an amount of information thereof, said encoding means having a first mode in which the image signal is encoded by reference only to a present picture to be encoded and a second mode in which the image signal is motion-compensation-encoded by reference to a picture other than the present picture, each picture having a first area encoded in the first mode and a second area encoded in either the first or the second mode, the encoding means including changing means for changing in a predetermined direction the position of said first area at intervals; characterised in that said changing means is arranged to change the position of said first area such that the positions of the first areas of adjacent pictures are mutually overlapped, and wherein the extent of the overlapped area between the first areas of the adjacent pictures is larger than or equal to an extent corresponding to the maximum motion vector which can be compensated by the motion compensation in said predetermined direction. According to a further aspect of the present invention there is disclosed a method of encoding a motion picture sequence, the method comprising the steps of: inputting an image signal; encoding the image signal to compress an amount of information thereof, said encoding step including a first mode of encoding in which the image signal is encoded by reference only to a present picture to be encoded and a second mode of encoding in which the image signal is motion-compensation-encoded by reference to a picture other than the present picture, each picture having a first area encoded in the first mode and a second area encoded in either the first or the second mode; and changing in a predetermined direction the position of said first area at intervals; characterised in that said changing step is performed so as to change the position of said first area such that the positions of the first areas of adjacent pictures are mutually overlapped, and wherein the extent of the overlapped area between the first areas of the adjacent pictures is larger than or equal to an extent corresponding to the maximum motion vector which can be compensated by the motion compensation in said predetermined direction. Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram which shows an image encoding device according to an embodiment of the present invention. Figure 2 shows a waveform output from a control circuit shown in Figure 1. Figure 3 shows examples of a refresh operation of the encoding device shown in Figure 1. Figure 4 shows a refresh operation of the encoding device shown in Figure 1. DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS An encoding device relating to the present invention is explained by the following. Figure 1 is a block diagram which shows an encoding device as an embodiment of the present invention. In Figure 1, 101 shows an input terminal which receives an image signal. The image signal is an analogue motion video signal like a television signal. 102 shows an analogue-to-digital (A/D) conversion circuit for converting the analogue video signal to a digital video signal. 103 shows a block dividing circuit for changing the order of pixels included in the digital video signal and for dividing the pixels into a plurality of blocks each of which is composed of a plurality of pixels. 104 shows a subtracting circuit which calculates a difference between a video signal of a present frame and a predictive video signal. 105 shows a switching circuit which selectively outputs a signal output from the block dividing circuit 103 and a signal output from the subtracting circuit. 106 shows a discrimination circuit which compares an efficiency of encoding the video signal of the present frame with an efficiency of encoding the predictive video signal to select one of them as a signal to be encoded. 107 shows a control circuit for a refresh operation to which a frame periodical signal generated by a frame periodical signal generating circuit 125 and fixed number data W and S set by a fixed number setting circuit 126 are supplied. The operations of the control circuit 107 are explained in detail afterwards. 108 shows an OR circuit to which a descrimination result from the discrimination circuit 106 and a refresh control signal from the control circuit 107 are supplied. 109 shows an orthogonal transformation circuit for orthogonally transforming a signal selected by the switching circuit 105. 110 shows a quantizing circuit for quantizing orthogonally transformed coefficients. 111 shows a variable length encoding circuit for encoding quantized coefficients using a well-known variable length encoding circuit. 112 shows a buffer memory for controlling a quantity of data to be transmitted in a unit time. 113 shows a transmission interface circuit which forms a transmission format to transmit data, and 114 shows an output terminal for outputting the data. 115 shows a reverse-quantizing circuit which executes a reverse operation to the quantizing circuit 110. 116 shows a reverse orthogonal transformation circuit which execute a reverse operation to the orthogonal transformation circuit 109. 117 shows an adding circuit to produce a local decoded signal. 118 shows a switching circuit which selects either a terminal a or a terminal b in response to an output of the OR circuit 108, and connects with the switching circuit 105. 119 shows an image memory for temporarily storing the local decoded signal, as a reproduced signal, of the present frame and for outputting a local decoded signal of a preceding frame. 120 shows a motion vector detection circuit for calculating a motion vector by comparing the signal of the present frame and the local decoded signal of the preceding frame. 121 shows a motion compensating circuit for modifying the local decoded signal of the preceding frame to compensate a motion of the images on the basis of the motion vector produced by the motion vector detection circuit 120. Operations of the encoding device having a structure mentioned above are explained by the following. The analogue video signal input from the input terminal 101 is converted to the digital video signal by the A/D conversion circuit 102. The order of pixels in the digital video signal is changed, and the pixels in the digital video signals are divided in the plurality of blocks each of which has i pixels in a horizontal direction and j lines in a vertical direction, by the block dividing circuit 103. For instance, each block comprises (8x8) pixels when i=j=8 . The signal produced in such way by the block dividing circuit 103 is supplied to the subtracting circuit 104, terminal a of the switching circuit 105 and the discrimination circuit 106. On the other hand, the predictive signal formed by modifying the local decoded signal of the preceding frame in the motion compensating circuit 121 is also supplied to the subtracting circuit 104. The subtracting circuit 104 calculates difference values between the predictive signal output from the motion compensating circuit and the signal of the present frame processed through the block dividing circuit 103, and supplies the difference values to terminal b of the switching circuit 105 and the discrimination circuit as a difference signal. The discriminating circuit 106 compares efficiencies for encoding the signal of the present frame and the predictive signal, and outputs a discriminating result which indicates which signal is better for encoding. In short, the discriminating circuit 106 selects the encoding system between the intra-frame encoding and the inter-frame encoding systems. The discrimination result controls the switching circuit 105 and the switching circuit 118 through the OR circuit 108, such that the terminal a connects to a common terminal when the efficiency for encoding the signal of the present frame is better than that for encoding the predictive signal, and the terminal b connects to the common terminal when the efficiency for encoding the predictive signal is better than that for encoding the signal of the present frame. On the other hand, a control signal for forcibly setting the intra-frame encoding system to periodically execute the refresh operation is produced by the control circuit 107 and is supplied to another input of the OR circuit 108. The purpose of the refresh operation is to inhibit a spread of errors in a time-base direction while errors are occurring. The detailed operations of the control circuit are explained afterwards. The selected signal output from the switching circuit 106 is supplied to the orthogonal transformation circuit 109. In the present embodiment, Discrete Cosine Transform (DCT) is used as a system having a high transforming efficiency and being readily realised in hardware. The orthogonal transformation circuit 109 outputs the orthogonal transformed coefficients and the coefficients are supplied to the quantizing circuit 110. The quantizing circuit 110 quantizes the coefficients according to characteristics which are related to human visual characteristics and so on. The quantized coefficients output from the quantizing circuit 110 are supplied to the variable length encoding circuit 111 and the reverse-quantizing circuit 115. The variable length encoding circuit 111 firstly changes the order of the quantized coefficients in order to heighten the efficiency of encoding the quantized coefficients in consideration of distributions of the quantized coefficients depending on characteristics of images. After that, the circuit 111 executes variable length encoding, details of which are selected such that the highest efficiency is obtained according to the distributions. An encoded signal output from the variable length encoding circuit 111 is input to the buffer memory 112. The buffer memory 112 regulates a quantity of data to be output in the unit time, although a quantity of data output from the variable encoding circuit 111 in the unit time varies. In short, a quantity of data in each frame may be varied, so that the memory 112 controls a quantity of data in a unit period of time which is much longer than a period of time for one frame. Output data from the buffer memory 112 are supplied to the transmission interface circuit 113. The transmission interface circuit 113 outputs a transmissible video signal synchronized with a transmitting clock. The transmissible video signal is composed of the image data read from the buffer memory 112, synchronizing data and error correction codes produced in the circuit 113, and motion vector data provided by the motion vector detection circuit 120, according to a predetermined transmitting format. Such transmissible video signal is supplied to transmitting path through the output terminal 114. On the other hand, the quantized coefficients supplied to the reverse-quantizing circuit 115 are processed by a reverse characteristic to that of the quantizing circuit 110. In short, the reverse-quantizing circuit 115 outputs similar coefficients to orthogonally transformed coefficients to be supplied to the quantizing circuit. Accurately speaking, the circuit 115 outputs representative coefficients each of which represents coefficients included in each quantizing step. Such representative coefficients are supplied to the reverse orthogonal transformation circuit 116, and are processed by a reverse characteristic to the orthogonally transformation circuit 109. Therefore, the reverse orthogonal transformation circuit 116 outputs a similar signal to the signal to be supplied to the orthogonal transformation circuit 109. Such reverse orthogonally transformed signal and a signal output from the switching circuit 118 are supplied to the adding circuit 117. While the switching circuit 118 is connecting a common terminal thereof to the terminal a, the switching circuit 105 is also connecting the common terminal thereof to the terminal a and the intra-frame encoding system is being executed. In other words, the signal of the present frame is being encoded and decoded without the above-mentioned subtraction and a decoded signal is being supplied to the adding circuit 117. In this case, an output signal of the adding circuit 117 is identical with an input signal thereof and is similar to the signal output from the block dividing circuit 103. While the switching circuit 118 is connecting the common terminal thereof to the terminal b, the switching circuit 105 is outputting a difference signal output from the subtracting circuit 104 and a signal similar to the difference signal is being supplied to the adding circuit 117. The difference signal is produced by subtracting the predictive video signal produced by the motion compensating circuit 121 as mentioned above. The predictive video signal is also supplied to the terminal b of the switching circuit 118. Therefore the output signal of the adding circuit 117 is also similar to the signal output from the block dividing circuit 103 while the inter-frame encoding system is being executed. The image memory 119 delays the local decoded signal produced by the adding circuit 117 about one frame period of time and outputs the video signal of the preceding frame. The motion vector detection circuit 120 receives the video signal of the preceding frame output from the image memory 119 and the video signal of the present frame output from the block dividing circuit 103, and compare them to calculate a moving direction and a moving extent of the block. The motion vector which indicates the moving direction and the moving extent is supplied to the motion compensating circuit 121. Many methods for calculating such motion vector have already been proposed and well-known. Therefore, detailed explanations of calculating the motion vector are omitted. The motion compensating circuit 121 produces an ideal predictive video signal which is as similar as possible to the video signal of the present frame by adjusting output timing and order of the video signal of the preceding frame on the basis of the motion vector. Further, such motion compensating process is also well-known and has been proposed. Therefore, detailed explanations of motion compensating are also omitted. Control operations of the control circuit 107 are described by the following. Figure 2 shows waveforms of the signal output from the control circuit 107 and relations between the waveforms and fixed number data W and S. The control signal has "1" level (high level) during a period which has a length of time corresponding to the data W in a certain first frame. The "1" level causes the encoding device to execute the refresh operation. Accordingly, hereinafter the period when the control signal is "1" is called a refresh period. Outside the refresh period, the control signal has "0" level (low level) and the encoding device executes a normal operation, in short, encodes a video signal by using a selected proper encoding system between the intra- and the inter-frame encoding systems. The refresh period comes repeatedly every line period as shown in Figure 2. Therefore, parts of lines corresponding to the "1" level occupy a strip-shaped area which has a width corresponding to the data W and spreads in a vertical direction on a picture. Hereinafter, the strip-shaped area is called a refresh area. The pixels in the refresh area are processed by the refresh operation. In a second frame, the refresh period is delayed from that in the first frame by a period corresponding to the data S as shown in Figure 2. On a picture, the refresh area is shifted by a distance corresponding to the fixed number data S in a horizontal direction. After a third frame, the refresh period is delayed by the period corresponding to the data S every period of one frame, and the refresh area is shifted by the distance corresponding to the data S every period of one frame. In the present embodiment, the data S is set such that the period corresponding to the data S is one n-th, n being an integer. Therefore, the refresh period returns an initial position every n frame. The control circuit 107 outputs the refresh control signal as shown in Figure 2. Figure 3 (a) shows the refresh areas according to the refresh periods shown in Figure 2 on the picture in continuous frames. Figure 3 (b) shows another example of the refresh areas which are strip-like areas spreading in a horizontal direction and have a width corresponding to the data W. In this case, the refresh area is shifted by a distance corresponding to the data S in a vertical direction. The encoding device shifting the refresh area every period of frame, as mentioned above, can refresh a whole area of the image, with a relatively uniform quantity of data for transmission or storage in each frame. And the encoding device making the refresh area occupy a continuous area can execute a good motion compensating operation, because the motion compensating operations are performed in a remaining area which is also continuous and are accurately performed by an extent between adjacent pixels as a unit. The ideal conditions for the data W and the data S are considered by referring to Figure 4 as follows. When that the refresh area is set in the first frame as shown in Figure 4, error data may occur in the area outside the refresh area and, in the second frame, such error data can spread from outside the refresh area in the first frame by an extent corresponding to the maximum motion which the motion compensation circuit can compensate. Supposing that the extent by which the error data can spread, in other words, the extent corresponding to the maximum motion which can be compensated, is M, the data W and the data S are ideally set so that following formulas are satisfied: W ≥ M + 1 1 ≤ S ≤ (W - M) The unit used in the above formulas is the distance between adjacent pixels. In the second frame shown in Figure 4, the refresh area (where the intra-frame encoding system is performed) is shifted by the distance S. In the case where the data S and the data W meet the above mentioned ideal condition, the refresh areas in the first and second frames overlap each other by a width (distance) M as shown in Figure 4. Therefore, an area in the second frame to which error data can spread from the first frame is definitely refreshed. Accordingly, errors can not spread into an area corresponding to the refresh area of the first frame. The encoding device which sets the data S, W as above-mentioned ideal conditions, can refresh the whole area without leaving any errors by shifting the refresh area every frame. The encoding device described above sets the refresh area having a fixed extent in each of the frames. Therefore the whole area can be refreshed, nevertheless a quantity of data for each frame can be made uniform. Accordingly, the encoding device can avoid frequent deteriorations of images and can prevent bad influences on controlling to buffer. In above described embodiments, a unit to be processed is supposed one frame of the video signal. However, the present invention can be applied to the encoding device which performs an intra-field encoding system and a inter-field encoding system. Also in this case, the encoding device can embody the same techniques as the above described embodiments. In this specification, "picture" indicates either frame or field. Values of M, W, S can be set by either a unit of a pixel or a unit of a block. It is desirable that the values are set by quantizing and converting such that the values are easily handled in hardware. As mentioned above, the encoding device applied to the present invention can avoid frequent deteriorations like flickering of images, can definitely refresh the whole images, and can prevent bad influences on hardware. Therefore the encoding device applied to the present invention can generally improve a quality of encoded images.

Claims: An image encoding apparatus for encoding a motion picture sequence, the apparatus comprising: input means (101) for inputting an image signal; and encoding means (103-111,115-121) for encoding the image signal to compress an amount of information thereof, said encoding means having a first mode in which the image signal is encoded by reference only to a present picture to be encoded and a second mode in which the image signal is motion-compensation-encoded by reference to a picture other than the present picture, each picture having a first area encoded in the first mode and a second area encoded in either the first or the second mode, the encoding means including changing means (107,108,125,126) for changing in a predetermined direction the position of said first area at intervals; characterised in that said changing means is arranged to change the position of said first area such that the positions of the first areas of adjacent pictures are mutually overlapped, and wherein the extent (W-S) of the overlapped area between the first areas of the adjacent pictures is larger than or equal to an extent corresponding to the maximum motion vector (M) which can be compensated by the motion compensation in said predetermined direction. An apparatus according to claim 1, wherein the extent (W) of the first area is constant. An apparatus according to claim 1 or 2, wherein said encoding means includes a motion detecting means (120) for encoding a direction and an extent of the motion of a part of the image. An apparatus according to any one of claims 1 to 3, wherein the first area is repeatedly located at the same position every "n" pictures, "n" being two or more. An apparatus according to any one of claims 1, 2 and 4, wherein said encoding means includes a motion detecting means for detecting a vector of the motion of the image, and said encoding means encodes the image signal by using the vector in the second mode. An apparatus according to claim 5 wherein said encoding means further includes a motion compensating means (121) for changing pixels of another picture to be used for encoding in accordance with the vector. An apparatus according to any one of claims 1 to 6, wherein said encoding means includes an orthogonal transforming means (109) for orthogonally transforming the image signal and said encoding means encodes the orthogonally transformed image signal. An apparatus according to any one of claims 1 to 7, wherein said encoding means includes dividing means (103) for dividing pixels of the image signal into a plurality of blocks each of which is composed of a plurality of pixels, and the first area and the second area are decided in units of blocks. A method of encoding a motion picture sequence, the method comprising the steps of: inputting an image signal; encoding the image signal to compress an amount of information thereof, said encoding step including a first mode of encoding in which the image signal is encoded by reference only to a present picture to be encoded and a second mode of encoding in which the image signal is motion-compensation-encoded by reference to a picture other than the present picture, each picture having a first area encoded in the first mode and a second area encoded in either the first or the second mode; and changing in a predetermined direction the position of said first area at intervals; characterised in that said changing step is performed so as to change the position of said first area such that the positions of the first areas of adjacent pictures are mutually overlapped, and wherein the extent (W-S) of the overlapped area between the first areas of the adjacent pictures is larger than or equal to an extent corresponding to the maximum motion vector (M) which can be compensated by the motion compensation in said predetermined direction. A method according to claim 9, wherein the extent (W) of the first area is constant. A method according to claim 9 or 10, wherein said encoding step includes a step of motion detection which encodes a direction and an extent of the motion of a part of the image. A method according to any one of claims 9 to 11, wherein the first area is repeatedly located at the same position every "n" pictures, "n" being two or more. A method according to any one of claims 9, 10 or 11, wherein said encoding step includes a step of motion detection which detects a vector of the motion of the image and encodes the image signal by using the vector in the second mode. A method according to claim 13 wherein said encoding step further includes a step of changing pixels of another picture to be used for encoding in accordance with the vector. A method according to any one of claims 9 to 14, wherein said encoding step includes a step of orthogonally transforming the image signal and encoding the orthogonally transformed image signal. A method according to any one of claims 9 to 15 wherein said encoding step includes a step of dividing pixels of the image signal into a plurality of blocks each of which is composed of a plurality of pixels, and the first area and the second area are decided in units of blocks.

Inventors: KANEKO YUSHI, OWADA MITSURU, KANEKO, YUSHI, OWADA, MITSURU, Kaneko, Yushi, c/o Canon Kabushiki Kaisha, Owada, Mitsuru, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1993
Main classification: H04N7
IPC codes: H04N7, G06T9