Image predictive coding and decoding method and apparatus

Abstract: Disclosed is an image predictive decoding method in which image data obtained by compressively coding a variable-size image using a prescribed method is input, a prediction image is generated using, as a reference image, at least one reproduced image which has been reproduced before an image being an object of decoding, and the object image is subjected to predictive decoding. In this method, the prediction image is generated using, as a reference image, at least one reproduced image which has been recently reproduced and includes significant image data to be referred to. Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object to increase the compression efficiency, it is avoided that a variable-size image which has already disappeared is used as the reference image for predictive decoding. As a result, coded data obtained by efficient compressive coding that suppresses the code quantity can be appropriately decoded.

Description: FIELD OF THE INVENTION The present invention relates to image predictive decoding and image predictive coding and, more particularly, to image predictive decoding methods, image predictive decoding apparatuses, image predictive coding methods, image predictive coding apparatuses, and data storage media, which are used for processing variable-size images. BACKGROUND OF THE INVENTION In order to store or transmit a digital image with high efficiency, it is necessary to compressively code the digital image. As a typical method for compressive coding of a digital image, there is DCT (Discrete Cosine Transformation) represented by JPEG (Joint Photographic Experts Group) and MPEG (Moving Picture Experts Group). Besides, there are waveform coding methods such as sub-band coding, wavelet coding, and fractal coding. Further, in order to eliminate a redundant signal between images, inter-image prediction using motion compensation is carried out, and a difference signal is subjected to waveform coding. Here, an MPEG method based on motion compensation DCT will be described. Initially, an input image of one frame to be coded is divided into plural macroblocks each having the size of 16×16 pixels. Each macroblock is further divided into four blocks each having the size of 8×8 pixels, and each block of 8×8 pixels is subjected to DCT and quantization. This process is called "intra-frame coding". On the other hand, using a motion detecting method such as block matching, from a frame temporarily adjacent to an object frame including an object macroblock to be quantized, a prediction macroblock having the smallest error from the object macroblock is detected, and motion compensation from the past image is carried out on the basis of the detected motion, thereby to obtain an optimum prediction block. A signal showing the motion toward the prediction macroblock having the smallest error is a motion vector. An image used as a reference for generating the prediction macroblock is called a reference image, hereinafter. Thereafter, a difference between the object block and the corresponding prediction block is obtained, and this difference is subjected to DCT to obtain a DCT coefficient. The DCT coefficient is quantized, and the quantized output is transmitted or stored together with the motion information. This process is called "inter-frame coding". The inter-frame coding has two prediction modes: prediction from a previous image in the display order, and prediction from both of previous and future images. The former is called "forward prediction", and the latter is called "bidirectional prediction". On the decoder end, after restoring the quantized DCT coefficient to the original difference signal, the prediction block is obtained on the basis of the difference signal and the motion vector, and the prediction block and the difference signal are added to reproduce the image. In this conventional technique, it is premised that the size of the reference image (an image used as a reference for generating a prediction image) is equal to the size of the object image. In recent years, plural objects constituting an image (arbitrary shape images) are separately subjected to compressive coding and transmitted, thereby to improve the coding efficiency and to enable object by object reproduction. In coding and decoding of such arbitrary shape image, the size of the image changes very often. For example, a ball becomes smaller and smaller, till at last it disappears. Further, there is a case where the size of the image (object) becomes zero. In ordinary predictive coding, a reference image is a reproduced image just before an object image which is currently being processed. When the size of the reference image is zero, since nothing is defined in the reference image, i.e., since the reference image has no significant image data to be used for predictive coding, predictive coding cannot be carried out. In this case, there is no conventional way except the intra-frame coding. However, generally the intra-frame coding increases the quantity of coded data and reduces the compression efficiency. When an image disappears (image-size = zero) and appears frequently in a sequence of motion picture, the coding efficiency is significantly degraded. For example, in a motion picture of flashing spotlight, when the light disappears and appears in image units, all the images of lights must be subjected to the intra-frame coding. The article "Object-oriented analysis synthesis coding of moving images" by Musmann H.G. et al., Signal Processing: Image Communication, XX, XX, vol. 1, 1 January 1989, pages 117 - 138, is concerned with a predictive coding method by dividing an image into three parameters, motion, shape and colour. Instead of using the usual block-by-block coding, according to D1 an image containing an object can be more efficiently coded using the predictive coding. However, when small objects are coded, the coder mode control switches back to block-oriented coding. SUMMARY OF THE INVENTION It is an object of the present invention to provide an image predictive decoding method, an image predictive decoding apparatus, an image predictive coding method, an image predictive coding apparatus, and a data storage medium, which can realize efficient predictive coding or decoding of a variable-size image even when the size of a reference image is zero or when the reference image is completely transparent. Other objects and advantages of the invention will become apparent from the detailed description that follows. The detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the scope of the invention will be apparent to those of skill in the art from the detailed description. Thus, the present invention concerns an image predictive decoding method and an image predictive coding method as defined in the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flowchart of a prediction image generation process in an image predictive decoding method according to a first embodiment not forming part of the present invention. Figures 2(a) and 2(b) are schematic diagrams for explaining image prediction in the image predictive decoding method according to the present invention. Figure 3 is a block diagram illustrating an image predictive decoding apparatus according to the first embodiment. Figure 4 is a block diagram illustrating a frame memory unit used in the image predictive decoding apparatus according to the first embodiment . Figure 5 is a flowchart of a prediction image generation process in an image predictive decoding method according to a third embodiment not forming part of the present invention. Figure 6 is a flowchart of a prediction image generation process in an image predictive decoding method according to a fourth embodiment not forming part of the present invention. Figure 7 is a diagram showing image data according to the first embodiment . Figure 8 is a flowchart of a prediction image generation process in an image predictive decoding method according to a second embodiment of the invention. Figure 9 is a diagram showing image data according to the second embodiment of the invention. Figure 10 is a flowchart of a prediction image generation process in an image predictive decoding method according to a fifth embodiment not forming part of the present invention. Figure 11 is a flowchart of a prediction image generation process in an image predictive decoding method according to a sixth embodiment of the present invention. Figure 12 is a block diagram illustrating an image predictive coding apparatus according to a seventh embodiment not forming part of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS [Embodiment 1] Figure 1 is a flowchart of a prediction image generation process in an image predictive decoding method according to a first embodiment not forming part of the present invention. Before explaining figure 1, an image prediction method according to this first embodiment will be described using figures 2(a) and 2(b). The size of an input image used in the image predictive decoding method of this first embodiment is variable, and it may happen that the size becomes zero. Figure 2(a) shows images 201∼210 of a motion picture, which are arranged in the display order. The image 201 is the first frame to be displayed, followed by 202, 203, ..., and this order is shown by #1∼#10. Since the image #1 (201) is the first image, it is subjected to intra-frame coding. In this first embodiment, an image (one frame) is divided into plural blocks each having the size of 8×8 pixels, and each block of 8×8 pixels is subjected to DCT and quantization. The quantized coefficient is subjected to variable-length coding. In decoding, the coded data obtained by the variable-length coding is subjected to variable-length decoding, and the quantized coefficient obtained by the variable-length decoding is subjected to inverse quantization and inverse DCT, thereby reproducing the image. Next, the image #2 (202) is subjected to inter-frame predictive coding by referring to the reproduced image #1 (201). In this first embodiment, using block matching as a motion detection method, a prediction block having the smallest error from the object block currently being processed is detected from the image #1 (201). On the basis of the detected motion from the object block toward the prediction block, an optimum prediction block is obtained by motion compensation of the object block from the reproduced image #1 (201). Next, a difference between the object block and the corresponding prediction block is obtained, and the difference is subjected to DCT. The DCT coefficient is quantized, and the quantized output is transmitted or stored together with the motion information. The reproduced image #1 (201) serves as a reference image for the image #2 (202). This prediction is called "forward prediction". In decoding, the prediction block is added to the difference which has been subjected to inverse quantization and inverse DCT, thereby reproducing the image. In like manner, the image #3 (203) and the image #4 (204) are subjected to predictive coding using reference images shown by the arrows. Like the images #6 (206), #8 (208) and #10 (210), prediction may be carried out from a previous image but one. In contrast with the forward prediction, like the images #5 (205), #7 (207) and #9 (209), prediction may be carried out by referring to a future image to be displayed after the object image. This prediction is called "backward prediction". When both the forward prediction and the backward prediction are carried out, this is called "bidirectional prediction". The bidirectional prediction has three modes: forward prediction mode, backward prediction mode, interpolation mode for balancing the forward prediction and the backward prediction. Figure 2(b) shows the transmission order, i.e., decoding order, of the images predicted as shown in figure 2(a). The image #1 (211) is initially decoded and reproduced. Referring to the reproduced image #1, the image #2 (212) is decoded. With respect to the bidirectional prediction image like the image #5 (216), the reference images used for the prediction have to be decoded and reproduced before the prediction image. Therefore, the image #6 (215) is decoded before the image #5 (216). Likewise, the image #8 (217) and the image #10 (219) are transmitted, decoded and reproduced before the image #7 (218) and the image #9 (220), respectively. When transmitting a variable-size image, the size of the image must be transmitted. In this first embodiment, the image size is described at the head of the coded data of the image, and the horizontal and vertical sizes Hm and Vm are shown by 20 bits each. Figure 7 shows coded image data (VD) according to this first embodiment, and the coded data includes the motion vector, the quantization width, and the DCT coefficient, in addition to the horizontal and vertical sizes Hm and Vm. Next, a description is given of the prediction image generation process in the image predictive decoding method according to the first embodiment. In order to generate a prediction image, initially, the size of the previous reference image is input (step 102), and it is examined whether the size of the reference image is zero or not (step 103). In the decoding order shown in figure 2(b), a reference image always exists before an image being an object of decoding (in coding, an object of coding). That is, the reference image is a most recently reproduced image in the predictive decoding method of this first embodiment. For example, in figure 2(b), a reference image for the image #4 (214) is the image #3 (213). However, an image reproduced by bidirectional prediction cannot be used for prediction, so that this image cannot be a reference image. Therefore, for example, a reference image for the image #8 (217) is the image #6 (215). When it is decided in step 103 that the size of the reference mage is not zero, step 104 follows, wherein a prediction image is generated using the reference image. On the other hand, when it is detected in step 103 that the size of the reference image is zero, step 105 follows, wherein a prediction image is generated using, as a reference image, a recently reproduced image of which size is not zero. The way of detecting a recently reproduced image of which size is not zero will be described hereinafter using figure 2(b). In the case of generating a prediction image of the image #4 (214), it is assumed that the size of the image #3 (213) just before the image #4 (214) is zero, and the size of the image #2 is not zero. In this case, a prediction image of the image #4 (214) is generated by referring to the image #2 (212). Likewise, in the case of generating a prediction image of the image #6 (215), assuming that the sizes of the images #3 (213) and #4 (214) are zero, the prediction image is generated by referring to the image #2 (212). This first embodiment employs block by block motion compensation as a method for generating a prediction image, like MPEG1. Figure 3 is a block diagram illustrating an image predictive decoding apparatus 300 according to the first embodiment . The image predictive decoding apparatus 300 receives image data obtained by compressively coding a variable-size image by a prescribed method, and performs predictive decoding of the image data. The image predictive decoding apparatus 300 includes a data analyzer 302, a decoder 303, and an adder 306. The data analyzer 302 analyzes the compressively coded image data, and outputs the quantization width and the DCT coefficient to the line 312, the motion vector to the line 318, and the image size to the line 321. The decoder 303 transforms the compressed block data (compressed block) from the data analyzer 302 to an expanded block by data expansion. The adder 306 adds the expanded block and the prediction block to generate a reproduced block. Further, the image predictive decoding apparatus 300 includes a frame memory unit 309 and a prediction image generator 310. The frame memory unit 309 stored the reproduced block. The prediction image generator 310 generates an address for accessing the frame memory unit 309 on the basis of the motion vector and obtains, as a prediction block, a block corresponding to the address from the image stored in the frame memory unit 309. In this first embodiment, the prediction image generator 310 decides, as a reference image, a single reproduced image which has been recently reproduced and includes significant image data to be referred to, on the basis of the image size from the data analyzer 302. The decision of a reference image may be carried out, as shown by dotted lines in figure 3, by using a controller 320 that controls the frame memory unit 309 according to the image size from the data analyzer 302. That is, the frame memory unit 309 is controlled by the controller 320 so as to select a single reproduced image which has been recently reproduced and includes significant image data to be referred to. The decoder 303 comprises an inverse quantizer 304 that inversely quantizes the compressed block from the data analyzer 302, and an inverse discrete cosine transformer (hereinafter referred to as IDCT) 305 that performs inverse DCT (transformation of a frequency region signal to a spatial region signal) to the output from the inverse quantizer 304. Further, reference numerals 301 and 307 designate an input terminal and an output terminal of the image predictive decoding apparatus 30C. A description is given of the operation of the image predictive decoding apparatus shown in figure 3. First of all, image data (coded data) obtained by compressively coding a variable-size image in a prescribed method is input to the input terminal 301. In this first embodiment, compressive coding is carried out using motion compensation DCT as in MPEG1, so that the coded data includes the motion vector, quantization width, DCT coefficient, and data of image size. Next, in the data analyzer 302, the compressively coded image data is analyzed, and the quantization width and the DCT coefficient are transmitted, as compressed block data, through the line 312 to the decoder 303. Further, the motion vector analyzed in the data analyzer 302 is transmitted through the line 318 to the prediction image generator 310. Likewise, the image size analyzed by the data analyzer 302 is transmitted through the like 321 to the controller 320. In the decoder 303, the compressed block data, i.e., compressed block, are expanded by the inverse quantizer 304 and the inverse DCT transformer 305, thereby generating an expanded block 314. To be specific, the inverse quantizer 304 inversely quantizes the compressed block, and the inverse DCT transformer 305 transforms the frequency area signal to the spatial area signal, thereby generating the expanded block 314. In the prediction image generator 310, according to the motion vector transmitted through the line 318, an address 321 for accessing the frame memory unit 309 is generated, and this address 321 is input to the frame memory unit 309. Then, a prediction block 317 is generated from images stored in the frame memory unit 309. The prediction block 317 (319) and the expanded block 314 are input to the adder 306, wherein these blocks 319 and 314 are added, thereby generating a reproduced block 315. The reproduced block 315 is output from the output terminal 307 and, simultaneously, it is transmitted through the line 316 and stored in the frame memory unit 309. When intra-frame decoding is carried out, the sample values of the prediction block are all zero. The operation of the prediction image generator 310 is identical to that already described with respect to the flowchart of figure 1. That is, the size of the reference image is input to the prediction image generator 310, and the reference image is decided in the prediction image generator 310. The decision of the reference image may be carried out by controlling the frame memory unit 309 according to information whether the size of the reference image is zero or not, which information is transmitted through the controller 320 and the line 322. Figure 4 is a block diagram illustrating a frame memory bank 406 as an example of the frame memory unit 309 in the image predictive decoding apparatus 300 according to the first embodiment. The frame memory bank 406 includes three frame memories 401∼403. The reproduced image is stored in one of the frame memories 401∼403. When generating a prediction image, these frame memories 401∼403 are accessed. In this first embodiment, the frame memory bank 406 has switches 404 and 405. The switch 405 is to select a frame memory for storing the reproduced image which is input through the line 408 (corresponding to the line 316 in figure 3), from the frame memories 401∼403. The switch 405 selects the frame memories 401∼403 one by one, controlled by the controller 320, i.e., according to the control signal 322. That is, after the first reproduced image is stored in the frame memory 401, the second reproduced image is stored in the frame memory 402. After the third reproduced image is stored in the frame memory 403, the switch 405 selects the frame memory 401. The switch 404 is connected through the line 407 (corresponding to the line 317 in figure 3) to the prediction image generator 310. Also this switch 404 selects the frame memories 401∼403 one by one, controlled by the controller 320, i.e., according to the control signal 322. However, the switching order is changed according to the size of the reference image. For example, although the switch 404 is to be connected to the frame memory 402 for generation of a prediction image according to the given order, when the image size of the frame memory 402 is zero, the controller 320 controls the switch 404 so as to select the previous frame memory 401 (on the premise that the image size of the frame memory 401 is not zero). In this way, a prediction image can be generated fron a reference image of which size is not zero. The switch 404 may be connected to plural frame memories at the same time. Further, in a unit where each frame memory is reset at every reproduction of a single image, a recently reproduced image of which size is not zero can be left in the frame memory by controlling the unit with the controller 320 so that the frame memory is not reset when the size of the reproduced image is zero. In other words, it is possible to prevent the frame memory from being updated. While in this first embodiment the block by block motion compensation DCT method is described, the present invention is applicable to other prediction methods using, for example, global motion compensation or arbitrary lattice-shaped block motion compensation. Further, although in this first embodiment a prediction image is generated from a single reproduced image serving as a reference image, the present invention is similarly applicable to the case where a prediction image is generated from plural reference images. As described above, according to the first embodiment , the size of a previous reference image which is input to the apparatus is detected and, when the size of the reference image is not zero, a prediction image is generated using the reference image. On the other hand, when the size of the previous reference image is zero, a prediction image is generated using a recently reproduced image of which size is not zero. Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object to increase the compression efficiency, it is avoided that a variable-size image which has already disappeared is used as a reference image for predictive decoding or coding, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). Further, the coded data obtained by the image predictive coding apparatus according to this seventh embodiment can be decoded correctly by the image predictive decoding apparatus according to the second embodiment. [Embodiment 2] In the first embodiment, it is detected whether the size of the reference image is zero or not, and the reference image is decided using the detected information. However, when the fact that the image size is zero is shown by another index (e.g., one-bit flag F), control can be carried out using this index In this second embodiment of the invention, generation of a prediction image is controlled using such index. That is, in this second embodiment, as shown in figure 9, coded data of an object image includes a one-bit flag F showing that the image size is zero, i.e., the corresponding reference image is completely transparent and has no coded data, and this flag F is placed before the horizontal and vertical sizes Hm and Vm showing the image size. When the image size is zero, the flag F is "0". In this second embodiment, generation of a prediction image is controlled using the flag F. Hereinafter, a description is given of a prediction image generation process in the image predictive decoding method according to the second embodiment, using the flowchart of figure 8. To generate a prediction image, initially, a previous reference image is input in step 802, and it is examined in step 803 whether the flag F of the reference image is "1" or not. When it is decided in step 803 that the flag F of the reference image is "1", the size of this reference image is not zero, namely, the reference image is not completely transparent and has coded data. So, in step 804, a prediction image is generated using the previous reference image. When it is decided in step 803 that the flag F of the reference image is not "1", step 805 follows, wherein a prediction image is generated using, as a reference image, a recently reproduced image of which flag F is not "0". As described above, according to the second embodiment of the invention, when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). In addition, the coded data of the object image has, at its head, a flag showing whether or not the previously reproduced image has significant coded data to be referred to, and the reference image is decided by detecting this flag. So, the operation of deciding the reference image is facilitated. [Embodiment 3] Figure 5 is a flowchart of a prediction image generation process in an image predictive decoding method according to a third embodiment not forming part of the present invention. The prediction image generation process according to this third embodiment is fundamentally identical to that according to the first embodiment except that step 505 in figure 5 takes the place of step 105 in figure 1. In step 505, when the reference image is zero or when the reference image is completely transparent (or when the flag F of the image is "0"), a prediction image to which a prescribed value is assigned, i.e., a prediction image having a prescribed value, is generated. In this third embodiment, it is assumed that the prediction image is gray, i.e., both the luminance signal value and the color difference signal value thereof are 128. As a result, when coding, the gray block is subtracted from the block being an object of coding. When decoding, the gray block is added to the block being an object of decoding. The prescribed value mentioned above may be variable, and this value may be transmitted from the encoder to the decoder to be used for generating a prediction image. As described above, according to the third embodiment , when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). Further, when the size of the reference image is zero, i.e., when the reference image is completely transparent, a prediction image having a prescribed value is generated. Therefore, in addition to the same effects as provided by the first embodiment, generation of the prediction image is facilitated. [Embodiment 4] Figure 10 is a flowchart of a prediction image generation process in an image predictive decoding method according to a fourth embodiment not forming part of the present invention. The prediction image generation process according to this fourth embodiment is fundamentally identical to that according to the second embodiment except that step 1005 in figure 10 takes the place of step 805 in figure 8. In step 1005, when the flag F of the reference image is "0", a prediction image to which a prescribed value is assigned, i.e., a prediction image having a prescribed value, is generated. According to the fourth embodiment, when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). Further, the coded data of the object image has, at its head, a flag showing whether or not the previously reproduced image has significant coded data to be referred to, and when it is detected that this flag is "0", a prediction image having a prescribed value is generated. Therefore, in addition to the same effects as provided by the second embodiment, generation of the prediction image is facilitated. [Embodiment 5] Figure 6 is a flowchart of a prediction image generation process in an image predictive decoding method employing bidirectional prediction, according to a fifth embodiment not forming part of the present invention. Hereinafter, a description is given of the bidirectional prediction process in the case where the reference image size is zero, i.e., when the reference image is completely transparent. Initially, in step 602, the sizes of forward and backward reference images are input. The image #5 (205) shown in figure 2(a) is a bidirectional prediction image of which forward reference image and backward reference image are the image #4 (204) and the image #6 (206), respectively. When it is decided in steps 603 and 604 that the sizes of both the forward and backward reference images are zero, an image to which a prescribed value is assigned, i.e., an image having a prescribed value, is generated as a prescribed value in step 605. When it is decided in steps 603 and 604 that the size of the forward reference image is zero and the size of the backward reference image is not zero, a prediction image is generated using only the backward reference image in step 606. When it is decided in steps 603 and 607 that the size of the forward reference image is not zero and the size of the backward reference image is zero, a prediction image is generated using only the forward reference image in step 608. When it is decided in steps 603 and 607 that the sizes of both the forward and backward reference images are not zero, a prediction image is generated using these reference images. In step 610, the generated prediction image is output. Receiving the prediction image, the encoder subtracts the prediction image from the object image, while the decoder adds the prediction image to the difference of the object image. In this way, the residual signal (difference signal) can be suppressed. As described above, according to the fifth embodiment , in the case where plural objects constituting an image are subjected to compressive coding and transmitted object by object, when a prediction image is generated using forward and backward reference images, it is avoided that variable-size images which have already disappeared are used as the reference images, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). Further, since a prediction image having a prescribed value is. generated, generation of the prediction image is facilitated. [Embodiment 6] Figure 11 is a flowchart of a prediction image generation process in a predictive decoding method using bidirectional prediction, according to a sixth embodiment of the present invention. This sixth embodiment is fundamentally identical to the fifth embodiment, in like manner that the second and fourth embodiments are fundamentally identical to the first and third embodiments, respectively. To be specific, in this sixth embodiment, "size is zero ?" in steps 603, 604 and 607 in figure 6 are changed to "flag F is 0 ?" as shown in steps 1103, 1104 and 1107 in figure 11. According to the sixth embodiment of the invention, in the case where plural objects constituting an image are subjected to compressive coding and transmitted object by object, when a prediction image is generated using forward and backward reference images, it is avoided that variable-size images which have already disappeared are used as the reference images, resulting in appropriate predictive decoding or coding capable of suppressing the residual signal (difference signal). Further, when it is detected that the flags F of the forward and backward reference images are "0", a prediction image having a prescribed value is generated. Therefore, detection of the variable-size image which has already disappeared is facilitated, and generation of the prediction image is facilitated. [Embodiment 7] Figure 12 is a block diagram illustrating an image predictive coding apparatus 1000 according to a seventh embodiment not forming part of the present invention. The coding apparatus 1000 comprises a texture coding unit 1100 that performs predictive coding of a texture signal comprising a luminance signal and a color difference signal, and a shape coding unit 1200 that performs predictive coding of a shape signal. The texture coding unit 1100 comprises a blocking unit 1110 that divides a texture signal per frame into plural macroblocks each having the size of 16×16 pixels (a unit subjected to coding) and outputs the divided texture signal; a subtracter 1160 that calculates a difference between a block being an object of coding (hereinafter, referred to as an object block) and a prediction block corresponding to the object block; a compressive encoder 1120 that compressively codes the difference; and a local decoder 1130 that expansively decodes the output from the compressive encoder 1120. The compressive encoder 1120 comprises a discrete cosine transformer (hereinafter referred to as a DCT) 1121 that performs discrete cosine transformation (DCT) of the difference, and a quantizer 1122 that quantizes the DCT coefficient. The local decoder 1130 comprises an inverse quantizer 1131 that inversely quantizes the output from the quantizer 1122, and an inverse discrete cosine transformer (hereinafter referred to as an IDCT) 1132 that performs inverse DCT (transformation of a frequency region signal to a spatial region signal) to the output from the inverse quantizer 1131. Further, the texture coding unit 1100 includes an adder 1170 that adds an expanded block output from the IDCT 1132 and the prediction block to generate a reproduced block; a frame memory unit (FM1) 1140 that stores the reproduced block; and a prediction image generator 1150 that obtains a prediction block corresponding to the object block from images stored in the frame memory unit 1140 by motion compensation on the basis of motion information detected by a prescribed motion detection method. The prediction image generator 1150 decides a reference image to be referred to when generating a prediction block (prediction image) from the reproduced images stored in the frame memory unit 1140 on the basis of the image size obtained from the output of the blocking unit 1110. On the other hand, the shape coding unit 1200 comprises a blocking unit 1210 that divides a shape signal per frame into plural macroblocks each having the size of 16×16 pixels (a unit subjected to coding) and outputs the divided shape signal; a subtracter 1260 that calculates a difference between a block being an object of coding (object block) and a prediction block corresponding to the object block; a shape encoder 1220 that codes the difference by a prescribed coding method; and a shape decoder 1230 that decodes the output from the shape encoder 1220 by a decoding method corresponding to the coding method. The shape encoder 1120 codes the output from the subtracter 1260 by a coding method such as quarter tree or chain coding. The shape coding unit 1200 further comprises an adder 1270 that adds a decoded block output from the shape decoder 1230 and the prediction block to generate a reproduced block; a frame memory unit (FM2) 1240 that stores the decoded block output from the adder 1270; and a prediction image generator 1250 that obtains a prediction block corresponding to the object block from the shape information stored in the frame memory unit 1240 by motion compensation based on the motion information detected by a prescribed motion detection method. Further, the prediction image generator 1250 decides a reference image to be referred to when generating a prediction block (prediction image), from the reproduced images stored in the frame memory unit 1240, on the basis of the image size obtained from the output of the blocking unit 1210. The decision of the reference image by the coding unit 1100 or 1200 may be carried out, as shown by dotted lines in figure 12, by using a shape detector 1280 that performs shape detection on the basis of the reproduced block, and controlling the frame memory units 1140 and 1240 according to the result of shape detection which is output from the shape detector 1280. In this case, the control of the frame memory units according to the result of shape detection is identical to the control of the frame memory unit 309 by the controller 320 according to the first embodiment. Further, the result of shape detection is applied to a variable-length encoder 1010 which is described later, and transmitted together with coded data of the texture signal and the shape signal. Further, the image predictive coding apparatus 1000 includes a variable-length encoder 1010. The variable-length encoder 1010 performs variable-length coding of the coded texture signal output from the texture encoder 1100 and the coded shape signal and the result of shape detection, which are output from the shape encoder 1200, and multiplexes these signals to be output. In figure 12, reference numeral 1001 denotes an input terminal for the texture signal, 1002 denotes an input terminal for the shape signal, and 1003 denotes an output terminal for the coded data. A description is given of the operation. When a texture signal (luminance/color-difference signals) and a shape signal are input to the image predictive coding apparatus 1000, the texture signal and the shape signal are divided into macroblocks (units subjected to coding) by the blocking units 1110 and 1210 included in the coding units 1100 and 1200, respectively, and prediction coding is carried out for each macroblock. In the texture signal coding unit 1100, the subtracter 1160 calculates a difference between an object block and a prediction block, the DCT 1121 transforms this difference to a DCT coefficient, and the quantizer 1122 quantizes the DCT coefficient to generate a quantized coefficient. The quantized coefficient is output toward the variable-length encoder 1010. The inverse quantizer 1131 inversely quantizes the quantized coefficient to generate a DCT coefficient, and the IDCT 1130 transforms the DCT coefficient to an expanded block corresponding to the object block by a process of transforming frequency region data to spatial region data. Further, the adder 1170 adds the expanded block and the prediction block to generate a reproduced block. The reproduced block is stored in the frame memory unit 1140. At this time, the prediction image generator 1150 generates a prediction block corresponding to the object block, from the images stored in the frame memory unit 1140, by motion compensation on the basis of motion information detected by a prescribed motion detection method. Further, the prediction image generator 1150 decides, as a reference image, a single reproduced image which has been recently reproduced and includes significant image data to be referred to, from the reproduced images stored in the frame memory unit 1140. When the apparatus is provided with the shape detector 1280, the decision of the reference image can be performed by controlling the frame memory unit 1140 according to the output from the shape detector 1280, i.e., information whether the size of the reproduced image to be referred to is zero or not. In parallel with the processing of the texture encoder 1100, in the shape encoder 1200, predictive coding of the shape signal is carried out in similar manner to the above-described predictive coding of the texture signal. That is, a difference between the object block and the prediction block is obtained by the subtracter 1260, and this difference is coded by a coding method such as quarter tree or chain coding in the shape encoder 1220, and the coding result is output toward the variable-length encoder 1010. Further, the coded shape signal from the shape encoder 1220 is restored by the shape decoder 1230, and the restored block and the prediction block are added by the adder 1270 to generate a reproduced block. The reproduced block output from the adder 1270 is stored in the frame memory unit 1240. In the prediction image generator 1250, a prediction block corresponding to the object block is generated from the shape information stored in the frame memory unit 1240, by motion compensation based on motion information detected by a prescribed motion detection method. Further, in the prediction image generator 1250, a single reproduced image which has been recently reproduced and includes significant image data to be referred to is decided as a reference image, from the reproduced images stored in the frame memory unit 1240, on the basis of the image size obtained from the output of the blocking unit 1210. When the apparatus is provided with the shape detector 1280, the decision of the reference image can be performed by controlling the frame memory unit 1240 according to the output from the shape detector 1280, i.e., information whether the size of the reproduced image to be referred to is zero or not. In this case, the,reproduced block is input to the shape detector 1280 wherein shape detection is carried out. For example, assuming that the shape signal is a binary signal, when there is only black data between white data and black data as shape data, no reproduced data exists. At this time, there is no texture signal corresponding to the shape signal of this block. In this case, as described above, a flag showing "no coded data" or data showing "image size is zero" is output from the shape detector 1280 toward the frame memory units 1140 and 1240 and the variable-length encoder 1010. In the frame memory units 1140 and 1240, according to the output from the shape detector 1280, control is carried out in similar manner to the control of the frame memory unit 309 by the controller 320 according to the first embodiment. As described above, according to the seventh embodiment, in the coding unit 1100 (1200), a single reproduced signal which has been recently reproduced and includes significant image data to be referred to is decided as a reference image from the reproduced images stored in the frame memory unit 1140 (1210) according to the image size obtained from the output of the blocking unit 1110 (1210). Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image for predictive coding, whereby appropriate predictive coding that can suppress the residual signal (difference signal) is carried out. Further, the coded data obtained by the image predictive coding apparatus according to this seventh embodiment can be decoded correctly by the image predictive decoding apparatus according to the second embodiment. Further, when the apparatus includes the shape detector 1280, the decision whether a reference image corresponding to the input object block exists or not is performed by detecting the shape of the reproduced block of the shape signal, in the shape coding unit 1200. When the reproduced block has no shape, in the texture encoder and the shape encoder, a prediction block is generated using a reproduced block which has been recently reproduced and has a shape, instead of the reproduced block corresponding to the object block. Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image for predictive coding, whereby appropriate predictive coding is carried out. Also in this case, the coded data obtained by the image predictive coding apparatus according to this seventh embodiment can be decoded correctly by the image predictive decoding apparatus according to the second embodiment. That is, in the image predictive decoding apparatus, the data analyzer 302 controls the frame memory unit 309 on the basis of the output from the shape detector 1280. Therefore, when coded data obtained by object by object predictive coding is decoded, it is avoided that a variable-size image which has already disappeared is used as a reference image for predictive decoding, whereby appropriate predictive decoding is carried out. In this seventh embodiment, the selection of the reproduced image as a reference image by the prediction image generator 1150 (1250) or the control of the frame memory unit 1140 (1240) according to the result of shape detection is carried out in the same manner as the selection of the reproduced image as a reference image by the prediction image generator 1150 (1250) or the control of the frame memory unit 309 by the controller 320 according to the first embodiment, respectively. However, the present invention is not restricted thereto. For example, when there is no image data to be referred to in a frame previous to the object frame, a prediction image having a prescribed value may be generated as described for the third embodiment. In this case, as an image predictive decoding apparatus corresponding to the image predictive coding apparatus, an apparatus that performs the image predictive decoding process according to the third embodiment is employed. Further, the prediction according to this seventh embodiment may be bidirectional prediction as described for the fifth embodiment. In this case, as an image predictive decoding apparatus corresponding to the image predictive coding apparatus, an apparatus that performs the image predictive decoding process according to the fifth embodiment is employed.

Claims: An image predictive decoding method for decoding object image data obtained by compressively coding a variable-size object image comprising the step (Fig.8; S804, S805) of generating a prediction object image by using, as a reference object image, at least one reproduced object image which has been reproduced before a target object image which is a target of decoding, said target object image being subjected to predictive decoding; said image predictive decoding method being characterised by that said prediction object image is generated using at least one reproduced object image which has been recently reproduced and includes significant object image data to be referred to (S805), and that said object image data includes a flag (F) that shows whether or not said object image data includes significant object image data. The image predictive decoding method of claim 1, wherein said prediction object image is generated using, as said reference object image, at least one of two recently reproduced object images (214, 215), the one (212) including significant object image data to be referred to. The image predictive decoding method of claim 1, wherein said prediction object image is generated using only a backward reference variable-size object image when it is determined that the size of a forward reference variable-size object image is zero and the size of the backward reference variable-size object image is not zero (S606), said prediction object image is generated using only the forward reference variable-size object image when it is determined that the size of the forward reference variable-size object image is not zero and the size of the backward reference variable-size object image is zero (S608), said prediction object image is generated using both the forward and backward reference variable-size object images when it is determined that the size of both the forward and backward reference variable-size object images are not zero (S609).

Inventors: BOON CHOONG SENG, BOON, CHOONG SENG
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1998
Main classification: H04N7
IPC codes: H04N7, G06T9