Abstract:
A fast discrete cosine transform (DCT) based method of encoding and decoding signals is disclosed. A signal of finite length is decomposed into subsignals of shorter length and an approximate DCT (A-DCT) is computed by keeping only selected subsignals. Computation time decreases relative to the number of subsignals being used to compute the A-DCT, fewer subsignals resulting in a faster computation. For signal compression applications, the computed A-DCT coefficients are quantized and coded. For signal recovery, the encoded A-DCT coefficients are processed through a decoder and the decoded signal is recovered using a direct inverse DCT (I-DCT). In some applications, an approximate inverse DCT (AI-DCT) based on similar decomposition can be used to recover the signal from the encoded data. In image coding applications, the image recovered from the decoded signal exhibits negligible block artifacts compared to conventional JPEG, particularly for low bit rate compression.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention pertains generally to discrete cosine transform encoding and decoding of two dimensional images, and more particularly to a discrete cosine transform based method of removing block artifacts in the recovered image and increasing processing speed. 
     2. Description of the Background Art 
     Image processing plays an important role in applications such as electronic processing of photographic images, transmission of video images in communications systems, and in the storage, recovery and transmission of image data in general. In particular, discrete transform of finite-length data sequences plays an important role in the foregoing, as well as other, signal processing applications. As a result, various discrete transform methods have been developed. Of particular interest is the discrete cosine transform (DCT) which is generally recognized as the best and effective way to encode image information. For compression of a highly correlated image, DCT encoding approaches the optimum performance of the Karhunen Loeve Transform (KLT). Therefore, DCT has been adopted for use in the JPEG (Joint Photographic Expert Group) and MPEG (Motion Picture Expert Group) international data compression standards for still images and video images, respectively. 
     Although DCT is a highly effective method of encoding, in very low bit rate coding the DCT exhibits severe block artifacts which can affect resolution and, therefore, are often undesirable. Further, the amount of time required for the DCT computation can be excessive. For example, MPEG compression is an asymmetrical process, and takes considerably more time to compress an image than it does to decompress an image. An MPEG data stream contains two layers; a system layer that contains timing, video and audio synchronization and other demultiplexing information, and a compression layer that includes the actual audio and image streams. 
     Prior to encoding, if the incoming video source is an analog signal, it is sampled and converted to a digital data stream. Each frame of the image is pre-filtered, scaled to size, and edge-smoothed. In the encoding process, both interframe encoding (which compares adjacent frames) and intraframe encoding (which looks within a signle frame) schemes are used. For motion detection, MPEG uses the first frame as a reference frame, divides the visual array of the reference frame into macroblocks of 16×16 pixels, and compares the information in the macroblocks with subsequent frames. Each macroblock is compared with the surrounding 128×96 pixel area to eliminate temporal redundancies. This sets up the motion prediction of the images and reduces the data size of subsequent frames. After motion prediction, MPEG divides the macroblocks into four subblocks of 8×8 pixels for spatial compression within individual frames. The 8×8 block is transformed to frequency coefficients using the same DCT encoding used in the JPEG method, and the coefficients are quantized to remove unnecessary information. In this so-called &#34;lossy&#34; compression, most of the decimation takes place in the higher frequencies which are less perceptible to human eyes. Following DCT and quantization, the block is mapped to a one dimensional sequence using a zig-zag scan. Run-length encoding reduces redundant information by flagging long sequences of identical pixels. Still, however, the coding is a slow process due to the number of transform coefficients involved. Further, when the encoded information is subsequently decoded, since the DCT operated on 8×8 pixel subblocks of the image the recovered image can exhibit block artifacts where the block boundaries of the encoded image are visible. 
     While various methods have been developed for faster DCT computations, as well as for reducing block artifacts, there is no known method for both removing block artifacts and increasing the speed of the DCT computation, particularly with regard to low bit rate encoding. The present invention satisfies that need, as well as others, and overcomes deficiencies in encoding and decoding methods heretofore developed. 
     SUMMARY OF THE INVENTION 
     The present invention pertains generally to a DCT-based method of encoding and decoding images which removes block artifacts found in conventional DCT encoded images and which reduces the time required for compression and decompression of the images. By way of example, and not of limitation, a visual image of size N×N which has been electronically scanned, photographed, or the like, is decomposed into subimages using a filter bank and the sub-image corresponding to the low-low frequency components is kept. Next, an approximate DCT (A-DCT) is computed from o the (N/2)×(N/2) low-low sub-image. Then, the A-DCT coefficients saved are quantized and Huffman coded based on the JPEG method. The encoded image data can then be transmitted or stored for subsequent decoding. In the decoder, the encoded A-DCT coefficients are first processed through a run length and Huffman decoding procedure. Finally, the decoded image is recovered using a direct (N×N)-point inverse DCT (I-DCT). The method can also be applied to one dimensional signals of finite length. 
     An object of the invention is to remove block artifacts from DCT encoded images. 
     Another object of the invention is to reduce the amount of time required to encode images. 
     Another object of the invention is to remove block artifacts from low-bit rate coded images. 
     Further objects and advantages of the invention will be brought out in the following portions of the specification, wherein the detailed description is for the purpose of fully disclosing preferred embodiments of the invention without placing limitations thereon. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention will be more fully understood by reference to the following drawings which are for illustrative purposes only: 
     FIG. 1 is a functional block diagram showing image encoding in accordance with the method of the present invention. 
     FIG. 2 is a functional block diagram showing subsequence generation by a two-band subband decomposition. 
     FIG. 3 is a functional block diagram showing image decoding in accordance with the method of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring more specifically to the drawings, for illustrative purposes the present invention is described with reference to FIG. 1 through FIG. 3. It will be appreciated that the apparatus may vary as to configuration and as to details of the parts, and the method may vary as to steps and their sequence, without departing from the basic concepts as disclosed herein. 
     Referring to FIG. 1, a functional block diagram showing a typical sequence of steps for image encoding in accordance with the present invention can be seen. At step 10, a still frame or moving visual image is captured and digitized using conventional imaging equipment such as a camera, frame grabber board, and related equipment, or the like. If a moving image is captured, it is encoded frame by frame. At step 12, each frame of the resulting image signal x(m,n) of size N×N is decomposed into four blocks or subbands using a Hadamard filter bank or the like, and the sub-image corresponding to the low-low frequency components is kept. Next, at step 14, an (N/2)×(N/2)-point subband DCT (SB-DCT) is developed from the low-low sub-image, thus computing approximately only the 1/4 of the transform coefficients corresponding to the low-low frequencies. In this step, an approximate DCT (A-DCT) is computed for the complete image signal. 
     In order to fully understand the nature of the A-DCT, a review of the nature of the DCT is useful. The DCT of an N-point data sequence x(n), n=0, 1, . . . , N-1 is defined as ##EQU1## The length-N input sequence x(n) can be decomposed into two subsequences g(n) and h(n) of length N/2 each: 
     
         g(n)=1/2{x(2n)+x(2n+1)}, h(n)=1/2{x(2n)-x(2n+1)}, n=0, 1, . . . , N/2-1(2) 
    
     The original sequence x(n) can then be reconstructed from the subsequences g(n) and h(n) by means of the inverse relationship 
     
         x(2n)=g(n)+h(n), x(2n+1)=g(n)-h(n),                        (3) 
    
     for 
     
         n=0, 1 . . . , N/2-1 
    
     A functional model of the generation of the subsequences g(n) and h(n) is shown in FIG. 2, from which it can be seen that the subsequence g(n) is the down-sampled version of the lowpass filtered sequence a(n), and the subsequence h(n) is the down-sampled version of the highpass filtered sequence b(n). 
     Substituting Equation (3) into Equation (1), Equation (1) can be rewritten as: ##EQU2## or equivalently as ##EQU3## for k=0, 1, . . . , N-1, where C g  (k) is the (N/2)-point DCT of g(n), S h  (k) is the (N/2)-point discrete sine transform (DST) of h(n), and &lt;k&gt; M  denotes k modulo M. This determination of the N-point DCT using Equation (5), requiring the computation of an (N/2)-point DCT and an (N/2)-point DST, is the SB-DCT referred to herein. 
     The SB-DCT of Equation (5) can be repeated by replacing the computation of the two (N/2)-point transforms, C g  (k) and S h  (k), with expressions involving (N/4)-point transforms as follows: ##EQU4## where C gg  (k) and C hh  (k) are the (N/4)-point DCTs of the subsequences g g  (n) and h h  (n) defined below: 
     
         g.sub.g (n)=1/2{g(2n)+g(2n+1)},                            (7a) 
    
     
         h.sub.h (n)=1/2{h(2n)-h(2n+1)}, n=0, 1, . . . , N/4-1      (7b) 
    
     and likewise, S gh  (k) and S hg  (k) are the (N/4)-point DCTs of the subsequences g h  (n) and h g  (n) defined below: 
     
         g.sub.h (n)=1/2{g(2n)-g(2n+1)},                            (8a) 
    
     
         h.sub.g (n)=1/2{h(2n)+h(2n+1)}, n=0, 1, . . . , N/4-1      (8b) 
    
     Assuming that certain frequency bands have negligible energy contribution, discarding of the calculations to the components in those bands reduces the complexity of the computation process. In many applications, most of the relevant information in images is in the low frequencies. Therefore, an approximation of the DCT coefficients can be obtained by neglecting h(n), the high frequency components of x(n). The approach is intuitively satisfactory, as in the primary band of interest, the inequalities ##EQU5## hold. Thus, a simple reasonable approximation of overall DCT can be obtained by discarding the second term in Equation (5), which is the contribution by the high frequency components, and retaining only the 1/2 of the coefficients corresponding to the low frequency components. Accordingly, the approximate DCT (A-DCT) for low frequencies is: ##EQU6## As can been seen from equation 10b, the term C g  (&lt;k&gt; N/2 ) is the exact DCT and the term ##EQU7## is a weighting factor which makes the approximate DCT C(k) as close as possible to the exact DCT based on the low frequency subcomponents. For applications where the relevant information is dominant in the high frequencies, an approximation of the DCT coefficients can be obtained by neglecting g(n), the low frequency components of x(n). Accordingly, the approximate DCT (A-DCT) for high frequencies is: ##EQU8## Similarly, the term S h  (&lt;k&gt; N/2 ) is the exact DCT and the term ##EQU9## is a weighting factor which makes the approximate DCT C(k) as close as possible to the exact DCT based on the high frequency subcomponents. At step 16, the A-DCT coefficients C(u, v) are then quantized and Huffman coded based on the JPEG method or the like. Finally, at step 18 the encoded image is stored in a conventional magnetic storage media or the like, or transmitted across a communications channel. 
     Referring now to FIG. 3, a functional block diagram showing a typical sequence of steps for image decoding in accordance with the present invention can be seen. At step 20, the encoded image is read from the storage media or received over the communications channel. Then, at step 22, the encoded A-DCT coefficients are processed through a conventional JPEG like decoding procedure. Next, at step 24, the restored image x(m, n) is recovered through a direct (N×N)-point inverse DCT (I-DCT). In this regard, it can be noted that the inverse DCT (I-DCT) of N point data sequence x(n) is determined according to ##EQU10## where 
     
         ζ(0)=1/2, ζ(k)=1 for 1≦k≦N-1       (12) 
    
     Also, note that if the dominant samples of the DCT are in the range of 0&lt;k&lt;(N/2)-1, it can be assumed that C(k)=0 for k&gt;(N/2)-1. Therefore, Equation (11) can be replaced with ##EQU11## to obtain an approximate inverse DCT (AI-DCT). This approximation reduces the I-DCT computational complexity to about half of that needed in the original one according to Equation (11), and can be used for decoding images where satisfactory resolution is obtained. Otherwise, the direct I-DCT is used. Further simplifications can be carried out if the dominant DCT samples are restricted to still smaller ranges. As with encoding of the image, the I-DCT and AI-DCT are performed using a conventional programmed data processor. Finally, at step 26 the recovered image is displayed or printed using conventional devices. 
     Example 1 
     To verify the effectiveness of the use of A-DCT in image coding, a part of the standard LENA image of size 256×256 were used as test images. The method of the present invention was compared with conventional DCT based JPEG coding for low bit rate per pixel (bpp) applications. Simulation results of LENA in Table 1 show that the A-DCT and DCT based coding methods exhibit similar performances with respect to the peak signal to noise ratio (PSNR), but the A-DCT based approach is over two times faster than the conventional DCT based method. 
     Accordingly, it will be seen that this invention provides a fast and effective method of encoding and decoding images, particularly at low-bit rate encoding, while providing for removal of block artifacts. It can also be noted that the A-DCT method of encoding in accordance with the present invention performs a forward transform on the dominant subbands of the decomposed image signal. For most images, the dominant subband is the low-low frequency subband. However, the method could be applied equally to any other subband which is dominant. Also, the subband decomposition is not limited to four subbands, although four subbands is the minimum decomposition used. The method can also be applied to M×M subband decomposition, where M=2 L  and L=an integer, for any image of size N×N. Furthermore, the method of the present invention can be applied to processing one dimensional audio signals where DCT processing is also used. Although the description above contains many specificities, these should not be construed as limiting the scope of the invention but as merely providing illustrations of some of the presently preferred embodiments of this invention. Thus the scope of this invention should be determined by the appended claims and their legal equivalents. 
     
                       TABLE 1______________________________________METHODPSNR(dB)           TIME(sec)          STANDARD            STANDARDbpp  A-DCT     DCT         A-DCT   DCT______________________________________0.40 36.81     37.83       9.4     21.10.33 36.37     36.82       9.2     21.10.27 35.97     35.59       9.0     21.00.22 35.42     34.31       9.0     21.00.19 34.95     33.42       8.9     20.7______________________________________