Method and apparatus for compressing and extending an image

Abstract: An image evaluation circuit is connected to an image compression circuit and an image extension circuit. In the image evaluation circuit, original image data and extended image data reproduced from compressed image data are compared in each block pixel by pixel to generate block noise. The comparison is carried out twice to provide two block noises by two compression factors, and an optimum compression factor is determined in accordance with the two compression factors and the two block noises.

Description: The invention relates to a method and an apparatus for compressing and extending an image, and more particularly to a method and an apparatus for evaluating an image by comparing an original image and an extended image. In a conventional facsimile or television-telephone set, transmission data is compressed and encoded so that the data transmission amount is decreased. As a method for compressing image data, an estimate encoding method and a transformation encoding method are utilized conventionally. In the estimate encoding method, a signal to be next supplied is estimated in accordance with a signal which has been known by decoding an encoded signal, so that only a signal component which is different in the estimation from a correct signal is transmitted to decrease the amount of information to be encoded. In the transformation encoding method, only coefficients of components, signal electric power of which converges on a low frequency region, are encoded to decrease the amount of information, because the signal electric power of image signals having high correlation is distributed mainly on the low frequency region. That is, the correlation of the image signals is positively utilized, so that higher compression effect is obtained in the transformation encoding method than in the estimation encoding method. However, the amount of arithmetic logic processes is larger in the transformation encoding method than in the estimation encoding method, so that the practical use of the transformation encoding method has been delayed as compared to the estimation encoding method. In accordance with the development of computer technology, however, the calculation of orthogonal transformation required for the transformation encoding method has been easy in these days, so that the transformation encoding method has been widely used in the encoding of images. As an orthogonal transformation to a frequency region, DCT (discrete cosine transformation) is considered to be most effective for practical uses, because DCT is superior in regard to electric power converging on a low frequency region and the process speed of calculation algorithm. Among other orthogonal transformations than DCT, slant transformation, hurl transformation, etc. can be used in encoding images. According to the conventional image compression method using DCT, however, there is a disadvantage in that an optimum compression factor is difficult to be set therein. That is, when coefficients are coarsely quantized, a data compression factor becomes large to deteriorate the quality of image. In other words, the process of the image compression is carried out with high speed, while block distortion which is discontinuity at boundaries of blocks is generated in reproducing images. On the other hand, when the coefficients are finely quantized, the data compression factor becomes small to decrease the block distortion, while a high speed process is hindered, and the process of pictures having fast motion is difficult to be carried out. Pages 250-269 of Vol 5 Dec '85 of the 2nd International symposium on Optical and Electroptical applied science and engineering discloses details of a Discret Cosine Transform. Accordingly, it is an object of the invention to provide a method and an apparatus for compressing and extending an image in which an optimum compression factor is selected to maintain the quality of the image and to avoid the decrease of the process speed. According to the first feature of the invention, there is provided a compression circuit for compressing image data to provide compressed image data by a predetermined compression factor, said compression circuit comprising means for transforming said image data to provide transformed image data by using DCT, means for quantizing said transformed image data to provide quantized image data in accordance with quantization table data corresponding to said predetermined and optimum compression factors, means for encoding said quantized image data to provide encoded image data in accordance with encoding table data, and means for transmitting said encoded image data along with said quantization and encoding table data to an extension circuit for extending said compressed image data to provide reproduced image data by extension data corresponding to said predetermined compression factor, said extension circuit comprising means for receiving said encoded image data along with said quantization and encoding table data, means for decoding said encoded image data to provide said quantized image data in accordance with said encoding table data, means for inversely quantizing said quantized image data to provide said transformed image data in accordance with said quantization table data, and means for inversely transforming said transformed image data to provide said reproduced image data by using said DCT; and an evaluation circuit for evaluating said predetermined compression factor to provide an optimum compression factor in accordance with comparison between said image data and said reproduced image data, said optimum compression factor being used in place of said predetermined compression factor for a subsequent compressing process by said compression circuit, said evaluation circuit comprising means for comparing said image data and said reproduced image data in each block pixel by pixel to derive block noise, means for holding said block noise, and means for generating said optimum compression factor in accordance with said predetermined compression factor and said block noise. According to the present invention, there is also provided a method of compressing and extending an image comprising the steps of: compressing image data to provide first compressed image data by a first compression factor said step of compressing comprising a step of compressing said image data to provide second compressed image data by a second compression factor; extending said first compressed image data to provide first reproduced image data by data corresponding to said first compression factor said step of extending comprising a step of extending said second compressed image data to provide second reproduced image data by data corresponding to said second compression factor a method for compressing and extending an image, comprising the steps of: compressing image data to provide first compressed image data by a first compression factor, said step of compressing comprising a step of compressing said image data to provide second compressed image data by a second compression factor; extending said first compressed image data to provide first reproduced image data by data corresponding to said first compression factor, said step of extending comprising a step of extending said second compressed image data to provide second reproduced image data by data corresponding to said second compression factor; comparing said image data and said first reproduced image data in each block pixel by pixel to derive first block noise, said step of comparing comprising a step of comparing said image data and said second reproduced image data in each block pixel by pixel to provide second block noise; generating an optimum compression factor in accordance with said first compression factor and said first block noise, said optimum compression factor being used for subsequently compressing said image data, said step of generating comprising a step of generating said optimum compression factor in accordance with said first and second compression factors and said first and second block noises, said optimum compression factor being determined to be a value between said first and second compression factors. The invention will be described in more detail in conjunction with appended drawings, wherein: Fig. 1 is a block diagram showing an image compression apparatus using DCT, and Fig. 2 is a block diagram showing an apparatus for compressing and extending an image of a preferred embodiment according to the invention. Before explaining a method and an apparatus for compressing and extending an image of a preferred embodiment according to the invention, the background of the invention will be explained. With reference to Fig. 1, an image data compression apparatus using a standard DCT method will be explained. The apparatus comprises a transmitter (compression circuit)1, a receiver (extension circuit) 2, and a transmission line 3, wherein image data 10 which is divided into blocks each having 8 x 8 pixels (dots) is supplied to the transmitter 1, and reproduced image data 20 is supplied from the receiver 2. In the transmitter 1, the two dimensions DCT transformation is carried out for each block in accordance with a following transformation equation. In the above equation, x and y are positions of a pixel, and u and v are positions of a DCT coefficient, wherein Cu and Cv are 1 2 , when u and v are zero, Cu and Cv are 1, when u and v are other values, Ls is 128, when a bit precision for a pixel value Pxy is of 8 bits, and Ls is 2048, when the bit precision is of 12 bits. As a result of this transformation, 64 coefficients Suv are obtained in each block, among which a coefficient Soo is called DC coefficient indicating a mean value (direct current component) of 64 pixels in a block, while the remaining coefficients are called AC coefficients. In accordance with this transformation, 8 x 8 pixels of a block are defined by a linear coupling of 64 DCT fundamental vectors. In this DCT transformation, electric power of ordinary images is distributed mainly on a low frequency region. By using this property, image compression is realized to carry out quantization in which a small number of bits are allocated to coefficients of a low frequency component, and a large number of bits are allocated to coefficients of a high frequency component. The coefficient Suv is quantized at each coefficient position in a step size different from others by using a quantization table 4. When the quantization is coarsely carried out by decreasing the number of quantization levels, the amount of data can be decreased. In this case, a data compression factor becomes large, while the deterioration can not be avoided in quality of images, if the coarse quantization is made without any consideration. As a result, discontinuity occurs at boundaries of blocks, and error occurs due to the drop of data. Thus, block distortion is increased in the quantization. On the other hand, when the quantization is finely carried out to result in the decrease of the compression factor, the block distortion is decreased, while the process of motion pictures having a large amount of data is difficult to be carried out. In fact, however, a high frequency component is not included in actual images by a substantial amount. In accordance with this tendency, the coarse quantization is made in the DCT method for higher order coefficients, and the fine quantization is made therein for lower order coefficients. Consequently, the encoding of data can be carried out with a high efficiency, while the quality of images is not lowered. Practically, the decision of a compression factor is made in accordance with the selection of an appropriate compression factor from plural compression factors by an operator. For this purpose, quantization tables corresponding to plural compression factors are accessed in a compression circuit to quantize coefficients of the transformation equation. At this time, almost all of the high frequency component is deleted. The quantized coefficients are encoded in accordance with entropy encoding by using an encoding table 5. For this purpose, Huffman encoding method is often used. Then, encoded data is transmitted from the transmitter 1 via the transmission line 3 to the receiver 2 together with a parameter including information as to which table is used. In the receiver 2, the encoded data is decoded to provide the quantized data by referring to the transmitted encoding table 5. The quantized data is inversely quantized to provide the DCT coefficients by referring to the transmitted quantization table 4. In accordance with the property of the quantization, completely original DCT coefficients are not restored. In this sense, the DCT method is defined as a non-inversible encoding method. Then, the DCT coefficients are inversely transformed to the reproduced image data 20 of blocks each having 8 x 8 pixels. As described above, the original image data 10 is processed in the transmitter 1 to be the compression data 30 in accordance with the orthogonal transformation, the quantization and the variable length encoding and the compression data 30 is extended in the receiver 2 to provide the reproduced image data 20 in accordance with the decoding, the inverse quantization and the inverse orthogonal transformation. Next, an apparatus for compressing and extending an image data of a preferred embodiment according to the invention will be explained in Fig. 2. The apparatus comprises a memory 22 for storing image data 21, a compression circuit 23 for compressing image data read from the memory 22, and extension circuit 24 for extending the compressed image data, a memory 25 for storing and providing the extended image data 26, and an evaluation circuit 31 comprising a subtracter 32 for carrying out a subtraction between image data pixels of each block read from the memories 22 and 25, a hold circuit 33 for holding the subtraction result as a block noise, and a decision circuit 34 for making a decision of an optimum compression factor in accordance with the subtraction results. In operation, the image data 21 is stored in the memory 22, from which the image data is read to be supplied to the compression circuit 23. Then, the image data is compressed in the compression circuit 23 by a compression factor A. The compressed data and table data corresponding to the compression factor A are transmitted to the extension circuit 24, and the compression factor A is supplied to be held in the hold circuit 33. In the extension circuit 24, the compressed data is extended in accordance with the transmitted table data to provide reproduced image data which is then stored in the memory 25. In the evaluation circuit 31, the subtracter 32 compares pixels read from the memories 22 and 25 in each block, so that the difference is detected therein as a block noise A which is held in the hold circuit 33. In accordance with the block noise A, a compression factor B is determined in the decision circuit 34 to be supplied to the compression circuit 23. In the compression circuit 23, image data read from the memory 22 is compressed by the compression factor B, and the compressed data and table data corresponding to the compression factor B are transmitted to the extension circuit 24, in which the compressed data is extended by referring to the transmitted table data. The extended data is stored in the memory 25, and image data read from the memories 22 and 25 are compared in the subtracter 32 in the same manner as in the case of using the compression factor A, so that a block noise B is detected to be stored in the hold circuit 33. Then, an optimum compression factor is determined in the decision circuit 34 in accordance with the compression factors A ·B and the block noises A'· B; so that the optimum compression factor thus obtained is supplied from the decision circuit 34 to the compression circuit 23, in which image data is compressed by the optimum compression factor. In making the decision of the optimum compression factor by the decision circuit 34, the compression factor B is determined to be small, where the block noise A'is considerably large, because it is considered that the compression factor A is much larger than the optimum compression factor, while the compression factor B is determined to be larger than the compression factor A, where the block noise A' is small. At any rate, an error of the optimum compression factor can be small by setting the optimum compression factor between the compression factors A and B. In the preferred embodiment, an optimum compression factor is applied to the aforementioned DCT algorithm, so that image data becomes improved in quality by suppressing block noise providing visual problem and the encoding of image data is carried out with high efficiency.

Claims: An apparatus for compressing and extending an image, comprising : a compression circuit (23) for compressing image data (21) to provide compressed image data by a predetermined compression factor, said compression circuit comprising means for transforming said image data to provide transformed image data by using DCT, means for quantizing said transformed image data to provide quantized image data in accordance with quantization table data corresponding to said predetermined and optimum compression factors, means for encoding said quantized image data to provide encoded image data in accordance with encoding table data, and means for transmitting said encoded image data along with said quantization and encoding table data to an extension circuit (24) for extending said compressed image data to provide reproduced image data (26) by extension data corresponding to said predetermined compression factor, said extension circuit comprising means for receiving said encoded image data along with said quantization and encoding table data, means for decoding said encoded image data to provide said quantized image data in accordance with said encoding table data, means for inversely quantizing said quantized image data to provide said transformed image data in accordance with said quantization table data, and means for inversely transforming said transformed image data to provide said reproduced image data by using said DCT; and an evaluation circuit (31) for evaluating said predetermined compression factor to provide an optimum compression factor in accordance with comparison between said image data and said reproduced image data, said optimum compression factor being used in place of said predetermined compression factor for a subsequent compressing process by said compression circuit, said evaluation circuit comprising means (32) for comparing said image data and said reproduced image data in each block pixel by pixel to derive block noise, means (33) for holding said block noise, and means (34) for generating said optimum compression factor in accordance with said predetermined compression factor and said block noise. A method for compressing and extending an image, comprising the steps of: compressing image data (21) to provide first compressed image data by a first compression factor, said step of compressing comprising a step of compressing said image data to provide second compressed image data by a second compression factor; extending said first compressed image data to provide first reproduced image data by data (26) corresponding to said first compression factor, said step of extending comprising a step of extending said second compressed image data to provide second reproduced image data by data corresponding to said second compression factor; comparing said image data and said first reproduced image data in each block pixel by pixel to derive first block noise, said step of comparing comprising a step of comparing said image data and said second reproduced image data in each block pixel by pixel to provide second block noise; generating an optimum compression factor in accordance with said first compression factor and said first block noise, said optimum compression factor being used for subsequently compressing said image data, said step of generating comprising a step of generating said optimum compression factor in accordance with said first and second compression factors and said first and second block noises, said optimum compression factor being determined to be a value between said first and second compression factors.

Inventors: YAMAOKA KENSUKE, YAMAOKA, KENSUKED., Yamaoka, Kensuke, c/o Hudson Soft Co. Ltd.
Applicants: HUDSON SOFT CO LTD, HUDSON SOFT CO., LTD.
Application year: 1993
Main classification: H04N1
IPC codes: H04N7, H04N1, G06T9