METHOD AND APPARATUS FOR COMPRESSING AND DECOMPRESSING MOVING PICTURE DATA
Technical Field
The present invention relates to a moving picture compression/decompression system, and more particularly to a method and apparatus for compressing/decompressing a moving image, which allows users to freely make video phone calls over even a low frequency band.
Background Art
In recent times, there have been proposed a variety of mobile services as the IMT (International Mobile
Telecommunication) -2000 service has become commercially available. A representative one of the mobile services is a RVP (Real-time Video Phone) . The RVP has a built-in codec (coder/decoder) for compressing/decompressing high- speed data in such a way that it effectively reduces a large amount of the moving image data and transmits the reduced amount of moving image data to a reception end. A process for compressing/decompressing arbitrary data using such a codec is well known to the those skilled in the art, and an example thereof is shown in Figs. 1~,2.
A conventional moving picture compression process begins at step A for dividing original image data into many blocks as shown in Fig. 1. In this case, the original image data is typically divided into 8x8 pixel blocks. Then, the 8x8 blocks are respectively DCT (Discrete Cosine Transform) -processed at step B, such that DCT coefficients are generated. The DCT coefficients are quantized by a quantizer at step C, and these quantized data are entropy-encoded according to a VLC (Variable Length Coding) and a Huffman Coding Algorithm at step D, thereby forming compressed coding data. Such compressed coding data are transmittable over a very high speed network of 384Kbps.
Fig. 2 is a flow chart illustrating a process for decompressing coding data compressed by the process of Fig. 1. Referring to Fig. 2, the compressed coding data are entropy-decoded at step E such that quantized DCT coefficients are obtained. The DCT coefficients are dequantized at step F such that original DCT coefficients are decompressed. The decompressed DCT coefficients are IDCT (Inverse DCT) -processed at step G by an IDCT (Inverse Discrete Cosine Transform) module. A block image composed of many IDCT blocks is reconstructed with original image data by a block image decompressor at step H.
As stated above, although such a compression codec for processing a moving image uses a DCT process as a frequency transformation method, a compression scheme using the DCT process needs to transmit just one picture. Therefore, a RVP for establishing real-time video communication over a low-frequency band such as a PSTN (Public Switched Telephone Network) of 5βkbps is unable to use the compression codec incorporating the DCT process therein. The reason for disabling the compression codec using the DCT process is that a conventional compression method is unable to compress data down to less than 0.125bpp (bit per pixel) even though the data must be compressed down to less than 0.125bpp in order to establish the real-time video communication over the PSTN of 56kbps. A decompressed image of good quality similar to the original image is guaranteed only when -this compression condition of less than 0.125bpp is provided. Otherwise, if the data is not compressed down to less than 0.125bpp, such a decompressed image of good quality similar to the original image is not guaranteed. An example of a display image formed in case of using a RVP service over a low frequency band is shown in Figs. 3a~3b. Fig. 3a is a view illustrating an original image of 8. Obpp (i.e., 64kbytes), and Fig. 3b is a view illustrating a decompressed image for which the original
image is compressed down to O.lββbpp (i.e., 1362bytes) and then transmitted over a PSTN. Provided that a RVP service is established over a low frequency band, it can be seen that a decompressed image is greatly degraded, as shown in Figs. 3a~3b.
In conclusion, in order to provide users with a RVP service over a low frequency band of 56kbps, it is necessary for a new algorithm to compress necessary data down to less than 0.125bpp and then decompress the compressed data.
Disclosure of the Invention
Therefore, the present invention has been made in view of the above problems, and it is an object of the present invention to provide a method and apparatus for compressing/decompressing a moving image, which allows users to freely establish real-time video phone calls over even a low frequency band such as a PSTN. It is another object of the present invention to provide a method and apparatus for compressing/decompressing a moving image which performs pixel interpolation by detecting neighbor lines adjacent to a target pixel while decompressing compressed moving
image in such a way that the number of lost lines is minimized in case of such pixel interpolation.
In accordance with one aspect of the present invention, the above and other objects can be accomplished by the provision of a method for decompressing compressed block images for which an original image data is- divided into a plurality of square blocks and then reduced down to a specific-sized image, including the steps of: a) decompressing the reduced-sized block images by sequentially entropy- decoding, dequantizing, and IDCT-processing data of the compressed block images; b) detecting pixels diagonal to those of the decompressed blocks on the basis of blocks formed before an image reduction process, performing primary interpolation on each of the detected pixels, performing secondary interpolation on the remaining pixels other than the detected pixels, interpolating some pixels lost by the image reduction process, decompressing the square blocks; and c) reconstructing the original image data with the decompressed square blocks.
In accordance with another aspect of the present invention, there is provided an apparatus for compressing/decompressing a moving image including: an encoder for removing some pixels from each block divided into a plurality of square blocks to reduce a size of
each block, sequentially performing a DCT (Discrete Cosine Transform) function, quantization, and entropy- encoding on each reduced-sized block, and compressing original image data; a decoder having a block image decompressor for decompressing the reduced-sized blocks by sequentially performing entropy-decoding, dequantization, and IDCT (Inverse Discrete Cosine Transform) function on the compressed original image data, detecting pixels diagonal to those of the decompressed blocks on the basis of blocks formed before the image reduction process, performing primary interpolation on each of the detected pixels, performing secondary interpolation on the remaining pixels other than the detected pixels, interpolating some pixels lost by the image reduction process, and decompressing the square blocks; and an image reconstruction unit for reconstructing the original image data with the decompressed square blocks.
Brief Description of the Drawings
The above and other objects, features and other advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
Fig. 1 is a flow chart illustrating a conventional moving image compression process;
Fig. 2 is a flow chart illustrating a conventional moving image decompression process; Figs. 3a~3b are views illustrating examples of a display image in case of using a RVP service over a low frequency band, and more particularly, Fig. 3a is an exemplary view illustrating an original image, and Fig. 3b is an exemplary view illustrating a decompressed image for which the original image is compressed down to a prescribed level and then transmitted over a PSTN;
Fig. 4 is a view illustrating a block diagram of an apparatus for compressing/decompressing a moving image in accordance with a preferred embodiment of the present invention;
Figs. 5a~5c are views illustrating a procedure for reducing the size of an arbitrary divided block image through a moving image compression process in accordance with a preferred embodiment of the present invention; Fig. 6 is a view illustrating a primary interpolation process for pixels lost by the moving image compression process through a moving image decompression process in accordance with a preferred embodiment of the present invention;
Fig. 7 is a view illustrating a secondary interpolation process for pixels lost by the moving image compression process through a moving image decompression process in accordance with a preferred embodiment of the present invention; and
Fig. 8 is an exemplary view illustrating a decompressed image for which the original image is compressed down to a ■ prescribed level and then decompressed.
Best Mode for Carrying Out the Invention
Now, preferred embodiments of the present invention will be described in detail with reference to the annexed drawings. In the drawings, the same or similar elements are denoted by the same reference numerals even though they are depicted in different drawings. In the following description, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.
Fig. 4 is a view illustrating a block diagram of an apparatus for compressing/decompressing a moving image in accordance with a preferred embodiment of the present invention. The system for compressing/decompressing a
moving image includes a coding unit for compressing original image data, a decoding unit for decoding the compressed image data, and an image reconstruction unit for reconstructing the original image data with the decoded block images. The image reconstruction unit may be contained in the decoding unit. Referring to Fig. 4, reference numerals 100, 102, 104, 106 and 108 are contained in the coding unit, and the remaining reference numerals are contained in the decoding unit. An image block processor 100 receives the original image data, and divides pixels of the received image into successive square blocks. A representative one of such square-divided blocks is shown in Fig. 5a for the convenience of description and better understanding of the present invention. Fig. 5a depicts an example of one 8x8-sized block image composed of 64 pixels.
In the meantime, a block image reduction module 102 removes some pixels from each block image divided by the image block processor 100 to reduce the size of the block image. This process for removing some pixels from each block image is called a downsampling process, and therefore the block image reduction module 102 is able to reduce the size of each block image using the downsampling process. An example of such reduced block is shown in Fig. 5c. In accordance with a preferred
embodiment of the present invention, it is assumed that the divided block image shown in Fig. 5a is downsampled by a factor of 1/4 to form a smaller block shown in Fig. 5c. Such a downsampling factor may be variable. For reference, Fig. 5b depicts a plurality of positions X of pixels that are removed from the divided block image of Fig. 5a through the downsampling process.
In this manner, in the case where the size of each divided block image is reduced by a desired block size at the block image reduction module 102, each reduced block is DCT-processed, quantized, and entropy-encoded in such a way that the original image data is compressed. In more detail, a DCT module 104 performs a DCT function on each reduced block such that the reduced blocks are respectively converted from spatial domain data into frequency domain data, thereby creating DCT coefficients. These DCT coefficients are quantized by a quantizer 106, and are entropy-encoded according to a VLC and Huffman Coding scheme via an entropy encoder 108 to create compressed coding data. Such compressed coding data is transmitted to either a called party video phone or a remote monitoring system, etc., over a low frequency band such as a PSTN.
Meanwhile, the decoding unit, for receiving the compressed image data from the aforementioned coding unit
and processing it, sequentially entropy-decodes it, dequantizes it, and finally performs an IDCT function on it, in such a way that the reduced blocks are primarily decompressed. For this purpose, the decoding unit includes an entropy decoder 200, a dequantizer 202, and an IDCT module 204.
The entropy decoder 200 entropy-decodes the coded data to generate quantized DCT coefficients. The dequantizer 202 dequantizes the quantized DCT coefficients to decompress the original DCT coefficients. Such DCT coefficients are IDCT-processed by the IDCT module 204 such that reduced blocks shown in Fig. 5c are normally decompressed.
Thereafter, a plurality of decompressed blocks such as the aforementioned enter a block image decompressor 206, and thereby the block image are restored to the original blocks prior to performing the above image reduction process by the block image decompressor 206. In more detail, the block image decompressor 206 finds pixels diagonal to those of the decompressed blocks on the basis of initial blocks prior to performing the image reduction process, performs primary interpolation on each value of the detected pixels, and then performs secondary interpolation on the remaining pixels other than the detected pixels, such that the old pixels lost by the
image reduction process are interpolated to decompress square blocks as shown in Fig. 5a. Such a pixel interpolation process of the block image decompressor 206 will hereinafter be described with reference to Figs. 6-7.
In the meantime, the square blocks decompressed by the block image decompressor 206 are reconstructed with the original image data at a block image reconstruction module 208, such that the reconstructed original image data is displayed on a display screen.
A block image decompression process of the block image decompressor 206 will hereinafter be described with reference to Figs. 6~7.
Fig. 6 is a view illustrating a primary interpolation process for pixels lost by the moving image compression process through a moving image decompression process in accordance with a preferred embodiment of the present invention. Fig. 7 is a view illustrating a secondary interpolation process for pixels lost by the moving image compression process through a moving image decompression process in accordance with a preferred embodiment of the present invention.
Fig. 6 is a view illustrating 8x8-sized blocks before the image reduction process. Oblique-lined blocks respectively indicate pixels of 4x4-sized reduced blocks
decompressed by the IDCT module 204. As shown in Fig. 6, if pixels of the decompressed blocks are properly arranged in the blocks before the image reduction, each pixel of the decompressed blocks is spaced apart from other pixels by a predetermined interval of one pixel, thereby forming a diagonal line. Therefore, pixel points diagonal to those of the decompressed blocks are detected and corresponding pixels present on the detected points are primarily interpolated in accordance with a preferred embodiment of the present invention, such that interpolation on oblique-lined pixels is completed as shown in Fig. 7. If secondary interpolation is performed on the remaining pixels other than the oblique-lined pixels, pixels lost by the image reduction process are interpolated. The primary interpolation used as an example in the present invention is adapted to establish line detection, and the secondary interpolation is adapted to detect a line and arc.
The primary interpolation will hereinafter be described in more detail with reference to Fig. 6.
In the case where pixel points diagonal to those of blocks decompressed by the IDCT module 204 are detected, three kinds of similar patterns are mainly provided, i.e., a first similar pattern having 4 neighbor pixels in a direction diagonal to an arbitrary pixel interpolation
point such as a reference character A, a second similar pattern having 2 neighbor pixels at an arbitrary pixel interpolation point such as reference characters C~D, and a third similar pattern having just one neighbor pixel at an arbitrary pixel interpolation point.
In accordance with the present invention, if 4 neighbor pixels exist in the diagonal direction of the pixel interpolation point A in case of the primary interpolation, a mean value of pixels arranged in the direction of the least gray level difference among the four neighbor pixels diagonal to the pixel interpolation point A is set to a pixel value of an interpolation point. In case of representing such a primary interpolation as a numerical formula, the pixel value of A is (φ+©) / 2 at a prescribed condition Λ | Φ-©| < | ©- ©| ", and the other pixel value of A is (©+©) /2 at the remaining cases other than the above-prescribed condition.
Meanwhile, if two neighbor pixels exist in the diagonal direction of the pixel interpolation points B~C, a mean value of the neighbor pixels is set to a pixel value of an interpolation point. Namely, the pixel interpolation point B may be set to (©+®)/2, and the other pixel interpolation point C may be set to (@+@)/2. And, if just one neighbor pixel (16) exists in the
diagonal direction of a pixel interpolation point D, a value of the one neighbor pixel (16) is set to a pixel value of an interpolation point.
In order words, the present invention adapts a mean value of pixels having the least gray level difference among neighbor pixels, whereas a conventional method adapts a mean value of neighbor pixels of an interpolation point to perform a pixel interpolation, so that the present invention restores a more natural image using a pixel interpolation function based on a line detection scheme.
If all the pixels for forming a diagonal line of a previous block ahead of an image reduction process are interpolated according to the aforesaid three patterns, then the primary interpolation according to the preferred embodiment of the present invention is completed. An exemplary block image after the primary interpolation is shown in Fig. 7. Oblique-lined sections of Fig. 7 indicate decompressed pixels ' and primary-interpolated pixels.
A pixel point E shown in Fig. 6 may be interpolated as follows. Provided that more than 4 pixels having a pixel interpolation point such as E form one diagonal line, a mean value of the four neighbor pixels is set to a pixel value of the interpolation point when the gray
level difference among pixels diagonal to the interpolation point E is below a threshold value. In case of representing such interpolation as a numerical formula, a pixel value of E is (©+©) / 2 at a prescribed condition "| ©-@| < | ®-©| ", other pixel value of E is (©+©) / 2 at a prescribed condition | ©-@| > | ©- ©I ", and other pixel value of E is (©+©+©+©) / 4 at a prescribed condition λλ | ©-@| =| ©-©| ".
Provided that the compressed image is very sensitive to line information as in animation image, the pixel interpolation method for the point E should satisfy the following method such that there is no line interruption in such a pixel interpolation process. In other words, provided that more than 4 pixels having a pixel interpolation point such as E form one diagonal line, pairs of pixels having the least gray level difference among pairs of neighbor pixels (©,©,©,©) and pairs of peripheral pixels (©,©,©,©,©,©) centering on the interpolation point E are detected and a mean value of the detected pixel pairs is set to a pixel value of the interpolation point. The pairs of neighbor and peripheral pixels are (©,©), (©,©), (©,©), (®,@), (©,©), and (©,©)).
Furthermore, the pixel interpolation method of the point E may be established with the following method. In
the case where many pixel pairs each having a prescribed gray level difference within a prescribed range are contained in the pairs of neighbor and peripheral pixels centering on an interpolation point such as point E, a mean value of pixel pairs approximate to the interpolation point E may be set to a pixel value of the interpolation point. If pairs of neighbor and peripheral pixels centering on the interpolation point E have a proper gray level difference within a prescribed range, a mean value of four pixels approximate to the interpolation point E may be set to a pixel value of the interpolation point.
In the case where such a primary interpolation is established as described above, the block image decompressor 206 performs secondary interpolation as follows .
Firstly, 32 non-interpolation pixels remain after the primary interpolation has been completed, and such non-interpolation pixels are indicated as while blocks having no oblique-lined pixels. In case of such non- interpolation pixels, a mean value of more than two pixels among many neighbor pixels arranged in four directions (i.e., right, left, top and bottom directions) of the non-interpolation pixel is set to a pixel value of an interpolation point. In this case, the number of
neighbor pixels is determined according the following method.
In the case where 3 neighbor pixels are determined as shown in a point A of Fig. 7, two methods are available. In a first method, a mean value of the 3 neighbor pixels arranged in three directions (i.e., right, left and bottom directions) of point A is calculated and set to a pixel value of point A. In a second method, a mean value of pixels having the least gray level difference between neighbor pixels (i.e., (©,©), (Φ,©), and (©,©)) may be set to a pixel value of the interpolation point A. The first method is preferably adapted to a high-speed mode, and the second method is preferably adapted to a typical optimal mode. In the case where 2 neighbor pixels are determined as shown in point B of Fig. 7, a mean value of the 2 neighbor pixels arranged in two directions (i.e., left and bottom directions) of point B is calculated and set to a pixel value of the point B. Also, in the case where 4 neighbor pixels are determined as shown in point C of Fig. 7, a mean value of the 4 neighbor pixels arranged in four directions (i.e., right, left, top and bottom directions) of point C is calculated and set to a pixel value of point C, but a mean value of pixels having the least gray level difference between neighbor pixels
(i.e., (18,19) and (14, 22) of Fig. 7) may be set to a pixel value of the interpolation point C. If the gray level difference between the top and bottom neighbor pixels of point C and the gray level difference between the right and left neighbor pixels of point C are all contained in a prescribed range, that is, if the gray level difference between vertical neighbor pixels of point C and the gray level difference between horizontal neighbor pixels of point C are similar to each other, a mean value of four pixels 14, 18, 19, and 22 arranged in four directions (i.e., right, left, top and bottom directions) of point C may be set to a pixel value of the interpolation point C.
Another pixel interpolation method for point C may be adapted to perform secondary interpolation. In more detail, a pair of pixels having the least gray level difference among a plurality of pairs (i.e., (14, 22), (18, 19), (15, 21), (10, 27), (13, 23), and (11,26)) of neighbor and peripheral pixels centering on the interpolation point C is found and a mean value of the found pair of pixels may be set to a pixel value of the interpolation point C.
Still another pixel interpolation method for the point C may be adapted to perform such a secondary interpolation. In more detail, an interpolation value of
the point C may be obtained differently from the above secondary interpolation method, whereas each interpolation value of the points A and B can be obtained as described above. So, a detailed description thereof will hereinafter be described.
In a first method for calculating the interpolation value of point C, in the case where a pair of pixels having the least gray level difference among a plurality of pairs (i.e., 14 and 22, 18 and 19, 15 and 21, 10 and 27, 13 and 23, and 11 and 26) of pixels centering on the interpolation point C is found, and an absolute gray level difference value of the found pair of pixels is much less than those of other pairs of pixels, a mean value of a pair of pixels having the least gray level difference is set to an interpolation value of point C.
In a second method for calculating the interpolation value of point C, in the case where a plurality of pairs
(i.e., (14, 22), (18, 19), (15, 21), (10, 27), (13, 23), and (11, 26)) of pixels centering on the interpolation point C have similar gray level differences to one another, a mean value of pixels 14, 18, 19 and 22 in the vicinity of point C is set to an interpolation value of point C.
In a third method for calculating the interpolation value of point C, in the case where a gray level
difference between the points 14 and 22 is similar to that between the points 11 and 26, a gray level difference between the points 14 and 22 is similar to that between the points 10 and 26, or a gray level difference between the points 14 and 22 is similar to that between the points 10 and 27, it is assumed that the gray level difference between the points 14 and 22 is a minimum value such that a mean value of the two pixel points 14 and 22 may be set to an interpolation value of point C.
If the secondary interpolation is completed as described above, a block image reduced to a 4x4-sized image in a data compression process is restored to a 8x8- sized square block image formed before the data compression process, and the decompressed 8x8-sized block image is transmitted to the image reconstruction module 208. The image reconstruction module 208 reconstructs the original image with a plurality of square blocks.
As stated above, the present invention reduces the size of a divided block image down to a desired size and transmits the reduced image to a target object, such that it generates high-compression image data of below 0.125bpp over a low frequency band and transmits it over the same. A reception end compares the gray level differences among neighbor and peripheral pixels of an
interpolation point with one another, finds pixels having the least gray level difference among many gray level differences, and sets a mean value of the found pixels to an interpolation value of the interpolation point, thereby effectively reducing a gray level difference between an interpolation pixel interpolated by an image decompression process and its own neighbor pixel, resulting in more natural decompression of such compressed image in the image decompression process. Fig. 8 is an exemplary view illustrating a decompressed image for which the original moving image is compressed down to 0.125bpp (i.e., 1022bytes) and then decompressed. In comparison with Fig. 3b, it is easily seen that the decompressed image of Fig. 8 looks much more natural than that of Fig. 3b.
Industrial Applicability
As apparent from the above description, the present invention divides moving image data into many block images, reduces the size of divided block image down to a desired size, compresses the reduced block images, and transmits it to a target object, such that it generates high-compression image data over a low frequency band and effectively transmits it over the same.
In addition, in case of interpolating the received compressed data and restoring it at a reception end, the reception end compares the gray level differences among neighbor and peripheral pixels of an interpolation point with one another, finds pixels having the least gray level difference among many gray level differences, and sets a mean value of the found pixels to an interpolation value of the interpolation point, thereby effectively reducing a gray level difference between an interpolation pixel interpolated by an image decompression process and its own neighbor pixel, resulting in more natural decompression of such compressed image in the image decompression process.
The aforesaid advantages make it possible to enable baseband transmission/reception (i.e., PSTN image data process) .
Furthermore, in case of interpolating compressed data, the present invention finds a position of an inclined line using a minimum function, and interpolates the found position, thereby minimizing the number of line interruptions caused by an interpolation process. Such an interpolation method is very effective in an image decompression process for restoring arbitrary images composed of clear lines and edges as in animation images .
Although the present invention has been described in connection with specific preferred embodiments, those skilled in the art will appreciate that various modifications, additions, and substitutions to the specific elements are possible, without departing from the scope and spirit of the present invention as disclosed in the accompanying claims. For example, although the present invention adapts a RVP (Real-time Video Phone) as an example for the convenience of description, it is also applicable to a home automation over a PSTN or a household DVR (Digital Video Recorder) . Therefore, the scope and spirit of the present invention should be defined as disclosed in the accompanying claims .