Abstract:
A process and a system for compressing highly correlated image data is provided. The system comprises means for capturing the image, means for converting to digital form, means for reshaping the data, means for encoding the repetitions, means for storing the compressed data and means for retrieving the data. The method comprises steps like capturing the image, converting into digital form, reshaping the data into matrix form, encoding the repetitions into a bit-plane index and encoding data values for storage, storing the compressed data in memory and retrieving the data for decompression. The system and method for compressing image and other highly correlated data is described in the description and illustrated by the way of drawings.

Description:
FIELD OF THE INVENTION  
       [0001]     The present invention relates to a method and system of compressing image data and other highly correlated data streams.  
       BACKGROUND OF INVENTION  
       [0002]     Image and data compression is of vital importance and has great significance in many practical applications. To choose between lossy compression and lossless compression depends primarily on the application.  
         [0003]     Some applications require a perfectly lossless compression scheme so as to achieve zero errors in the automated analysis. This is particularly relevant when where an automatic analysis is performed on the image or data. Generally, Huffman coding and other source coding techniques are used to achieve lossless compression of image data.  
         [0004]     In certain other applications, the human eye visually analyzes images. Since the human eye is insensitive to certain patterns in the images, such patterns are discarded from the original images so as to yield good compression of data. These schemes are termed as “visually lossless” compression schemes. This is not a perfectly reversible process as the de-compressed image data is different from the original image data. The degree of difference depends on the quality of compression, and the compression ratio. Compression schemes based on discrete cosine transforms and wavelet transforms followed by lossy quantization of data are typical examples of visually lossless scheme.  
         [0005]     As a general rule, it is desirable to achieve the maximum compression ratio with zero, or minimal, possible loss in the quality of the image. At the same time, the complexity involved in the system and the power consumed by the image compression system are important parameters when it comes to a hardware-based implementation.  
         [0006]     Usually, image compression is carried out in two steps. The first step is to use a pre-coding technique, which is normally based on signal transformations. The second step would be to further compress the data values by standard source coding techniques such as, for example, Huffman and Lempel-Ziv schemes.  
         [0007]     The initial pre-coding step is the most critical and important operation in image compression. The complexity involved with DCT and Wavelet based transformations is quite high because of the large number of multiplications involved. This is illustrated in the following DCT equation:  
         DCT   ⁡     (     i   ,   j     )       =       1       2   ⁢   N         ⁢     C   ⁡     (   i   )       ⁢     C   ⁡     (   j   )       ⁢       ∑     x   =   0       N   -   1       ⁢       ∑     y   =   0       N   -   1       ⁢       f   ⁡     (     x   ,   y     )       ⁢   cos   ⁢     ⌈         (       2   ⁢   x     +   1     )     ⁢   i   ⁢           ⁢   π       2   ⁢   N       ⌉     ⁢   cos   ⁢     ⌈         (       2   ⁢   y     +   1     )     ⁢   j   ⁢           ⁢   π       2   ⁢   N       ⌉                 
           where   ⁢           ⁢     C   ⁡     (   x   )         =         1     2       ⁢           ⁢   if   ⁢           ⁢   x     =   0       ,           ⁢       else   ⁢           ⁢   1   ⁢           ⁢   if   ⁢           ⁢   x     &gt;   0.         
 
         [0008]     In addition to the large number of multiplications involved in carrying out the above DCT equation, there is also a zigzag rearrangement of the image data, which involves additional complexity. These conventional schemes for image compression are not very well suited for hardware-based implementation.  
         [0009]     The true requirement is an image compression system which does not involve rigorous transforms, and complex calculations. It also has to be memory efficient and power efficient.  
         [0010]     There are various image compression techniques presently available. A familiar few are JPEG, JPEG-LS, JPEG-2000, CALIC, FRACTAL and RLE.  
         [0011]     JPEG compression is a trade-off between degree of compression, resultant image quality, and time required for compression/decompression. Blockiness results at high image compression ratios. It produces poor image quality when compressing text or images containing sharp edges or lines. Gibb&#39;s effect is the name given to this phenomenon—where disturbances/ripples may be seen at the margins of objects with sharp borders. It is not suitable for 2-bit black and white images. It is not resolution independent, and does not provide for scalability, where the image is displayed optimally depending on the resolution of the viewing device.  
         [0012]     JPEG-LS does not provide support for scalability, error resilience or any such functionality. Blockiness still exist at higher compression ratios and it does not offer any particular support for error resilience, besides restart markers.  
         [0013]     JPEG-2000 does not provide any truly substantial improvement in compression efficiency and is significantly more complex than JPEG, with the exception of JPEG-LS for lossless compression. The complexity involved in JPEG-2000 is higher for a lower enhancement in the compression ration and efficiency.  
         [0014]     Although CALIC provides the best performance in lossless compression, it cannot be used for progressive image transmission as it implements a predictive-based algorithm that can work only in lossless/nearly-lossless mode. Complexity and computational cost are high.  
         [0015]     The results show that the choice of the “best” standard depends strongly on the application at hand. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0016]     In order that the invention may be fully understood and readily put into practical effect, there shall now be described by way of non-limitative example only a preferred embodiment of the present invention, the description being with reference to the accompanying illustrative drawings in which:  
         [0017]      FIG. 1  illustrates the entire image compression system based on repetition coded compression on a hardware implementation;  
         [0018]      FIG. 2  is a sample grayscale image of a human brain, which is captured by magnetic resonance imaging (“MRI”) to demonstrate the compression able to be achieved by repetition coded compression system;  
         [0019]      FIG. 3  is an enlarged image of a small region from  FIG. 2 ;  
         [0020]      FIG. 4  shows that the image of  FIG. 2  is made up of many pixels in grayscale;  
         [0021]      FIG. 5  shows a 36-pixel region within the sample MRI image of  FIG. 2 ;  
         [0022]      FIG. 6  shows the ASCII value equivalent of the image data values for the image of  FIG. 2 ;  
         [0023]      FIG. 7  shows the application of repetition coded compression along the horizontal direction in the image matrix;  
         [0024]      FIG. 8  shows the application of repetition coded compression along the vertical direction in the image matrix;  
         [0025]      FIG. 9  shows the combination of horizontal and vertical bit-planes by a binary addition operation;  
         [0026]      FIG. 10  shows the total memory required for the 36-pixel region before and after applying repetition coded compression;  
         [0027]      FIG. 11  shows the application of repetition coded compression to the entire image; and  
         [0028]      FIG. 12  shows the operational flow for the implementation of repetition coded compression. 
     
    
     DETAILED DESCRIPTION  
       [0029]     In accordance with a preferred aspect there is provided a method of compression of image data of an image wherein each element is compared with a previous element. If they are both equal, a first value is recorded. If they are not both equal, a second value is recorded. Each element may be a pixel. The first value may be a 1, and the second value may be a 0.  
         [0030]     The first and second values may be stored in a bit plane. For a one-dimensional compression, a single bit plane may be used to store the values. However, for a two-dimensional compression, comparison may be in both horizontal and vertical directions, a separate bit plane being used for each direction.  
         [0031]     The bit-planes for the horizontal and vertical directions may be combined by binary addition to for a repetition coded compression bit-plane. Combining may be by binary addition, only the second values being stored for lossless reconstruction of the image. The result of the combining may be repetition coded compression data values. All other image data values may be able to be reconstructed using the repetition coded compression data values, and the bit planes for the horizontal and vertical directions.  
         [0032]     Storage in bit planes may be in a matrix. A single mathematical operation may be performed for each element.  
         [0033]     In accordance with a further aspect, there is provided a system for repetition coded compression comprising a camera for capturing at least one image and for supplying digital data; a reshaping block for rearranging the digital data into a matrix of image data values; a processor for receiving the matrix of image data values and compressing the image data values to form compressed data; and a memory for storage of the compressed data.  
         [0034]     The camera may be analog. An analog-to-digital converter may be used to convert the analog image to provide the digital data.  
         [0035]     In accordance with another aspect, there is provided a method for compression of an image comprising capturing the image and converting the image into digital form to provide digital data. The digital data is reshaped into a digital data matrix. Repetitions in the digital data matrix are encoded into a bit-plane index, and the data values of the digital data matrix are encoded for storage. The compressed data is stored in a storage memory.  
         [0036]     The bit-planes may contain information regarding the repetitions along horizontal and vertical directions. There may be further included the combining of the horizontal and vertical bit-planes by a binary addition operation to give a repetition coded compression bit-plane. There may also be included comparing the repetition coded compression bit-plane with the digital data matrix to obtain final repetition coded compression data values.  
         [0037]     The method may further include storing and archiving the repetition coded compression data values along with the horizontal and vertical bit-planes.  
         [0038]     The compression is preferably lossless. Alternatively, the method a method may further include compression by comparison with a threshold value to achieve lossy compression and a significantly higher compression ratio.  
         [0039]     The method may be used for an application selected from: medical image archiving, medical image transmission, database system, information technology, entertainment, communications applications, and wireless application, satellite imaging, remote sensing, and military applications.  
         [0040]     Image data is a highly correlated. This means that the adjacent data values in an image are repetitive in nature. Therefore, it is possible to achieve some compression out of this repetitive property of the image and then apply Huffman coding or other source coding schemes. Such a method would be very efficient.  
         [0041]     In repetition coded compression (“RCC”), each element is compared with the previous element. If both of them are equal then a value of “1” is stored in a bit-plane. Otherwise a value of ‘0’ is stored in the bit-plane. Only the difference value is stored in a matrix, instead of storing all the repeating values.  
         [0042]     In a one-dimensional performance of the method, only one bit-plane is used to code the repetition in the horizontal direction.  
         [0043]     But in a two-dimensional performance of the method, two bit-planes are used to code the repetitions in both the horizontal and the vertical directions. This is more efficient and gives a better compression ratio.  
         [0044]     The compression system is based on a mathematical comparison of adjacent image data values. The comparison is performed between adjacent image data values in both the horizontal as well as vertical directions. The bit-planes formed as a result of the comparison in the horizontal and vertical directions are respectively combined by a binary addition method. After this the resultant bit-plane positions are called as RCC bit-planes. The zero values in the RCC bit-plane are stored for lossless reconstruction of the original image. For lossless reconstruction, they are the only values stored. The stored values correspond to the same locations in the original image matrix as zeros in the RCC bit-plane and are hereinafter called RCC data values. All the other image data values can be reconstructed by using the RCC data values, and the horizontal and vertical bit-planes.  
         [0045]     In case of a lossy system of implementation, the adjacent pixels are not only compared for repetition, but also for the difference value. if the difference value between adjacent pixels is less than a given arbitrary threshold value, then the two adjacent pixels are made as the same. This further increases the number of repetitions in the image data and therefore also increases the compression ratio after repetition coded compression is applied. The value of the threshold can be varied according to the requirements of the particular application, and system. The higher the threshold, the better the compression ratio and also the higher the loss in the quality of the reconstructed image.  
         [0046]      FIG. 1  illustrates the entire image compression system based on repetition coded compression on a hardware implementation. The analog image signals  12  are captured by the camera  10  and are converted into respective digital data  16  by a analog to digital converter  14 . This digital data  16  is rearranged into a matrix of image data values by a reshaping block  18 . The reshaped image matrix is stored in the embedded chip  20 , which performs the entire repetition coded compression system. This therefore gives the compressed repetition coded compression data values  22  and also the bit-planes of data  24  for storage, archival and future retireval  26 .  
         [0047]      FIG. 2  is a sample image of the human brain which is captured by magnetic resonance imaging (MRI). This sample image may be used to demonstrate the compression achieved by repetition coded compression. It is a grayscale image.  
         [0048]      FIG. 3  zooms a small region from the sample MRI image of the human brain. This zoomed region may also be used for demonstrating the repetition coded compression system.  
         [0049]      FIG. 4  shows that the image is made up of lot of pixels in grayscale.  
         [0050]      FIG. 5  shows a 36-pixel region within the sample MRI image of the human brain.  
         [0051]      FIG. 6  shows the ASCII value equivalents of the image data values which are originally used for data storage. Each value requires eight bits (1 byte) of data memory. Currently, the 36-pixel region requires about 288 bits or 36 bytes of data memory. That data could be compressed and stored with only 112 bits after repetition coded compression.  
         [0052]      FIG. 7  shows the application of repetition coded compression along the horizontal direction in the image matrix. This results in the horizontal bit-plane and also the horizontal values stored.  
         [0053]      FIG. 8  shows the application of repetition coded compression along the vertical direction in the image matrix. This result in the vertical bit-plane, and also the vertical values stored.  
         [0054]      FIG. 9  shows the combination of horizontal and vertical bit-planes by a binary addition operation. This results in only five zero values which correspond to the final values stored from the original image matrix.  
         [0055]      FIG. 10  shows the total memory required for the 36-pixel region before and after applying repetition coded compression. The original memory requirement was 288 bits. After applying repetition coded compression the memory required was 112 bits. This is a great amount of compression.  
         [0056]      FIG. 11  shows the application of repetition coded compression to the entire image. The size is compressed to 44,000 bits from the original 188,000 bits.  
         [0057]      FIG. 12  shows an implementation of repetition coded compression. The image matrix  1201  is transposed  1202 , encoded along the horizontal  1203  and vertical  1204  directions and the respective bit-planes  1205 ,  1206  are derived. Further compression is achieved by combining the horizontal and vertical bit-planes  1203 ,  1204  by a binary addition operation. This results in the repetition coded compression bit-plane  1207 , which is logically inverted  1208  and compared  1209  with the original image matrix  1201  to obtain the final repetition coded compression data values  1210 . The repetition coded compression data values  1210 , together with the horizontal and vertical  1206  bit-planes are stored in a data memory  1211  for archival and future retrieval.  
         [0058]     The coded data can be further compressed by Huffman coding. This compression of the image data is achieved using the repetition coded compression system. This system is fast as it does not make use of complex transform techniques. The method may be used for any type of image file. In the example given above, the system is applied only for grayscale images. It may be applied to color images.  
         [0059]     The system of repetition coded compression of images may be applied to fields such as, for example, medical image archiving and transmission, database systems, information technology, entertainment, communications and wireless applications, satellite imaging, remote sensing, military applications.  
         [0060]     The preferred embodiment of the present invention is based on a single mathematical operation and requires no multiplication for its implementation. This results in memory efficiency, power efficiency, and speed, in performing the compression. Because of the single mathematical operation involved, the system is reversible and lossless. This may be important for applications which demand zero loss. The compression ratios may be significantly higher than existing lossless compression schemes.  
         [0061]     If the application permits a lossy compression system, a modification is made to the mathematical operation so that a certain amount of loss is observed in the compression, thereby resulting in higher compression ratios. This lossy compression system would find great applications in entertainment and telecommunication systems.  
         [0062]     Whilst there has been described in the foregoing description a preferred embodiment of the present invention, it will be understood by those skilled in the technology that many variations or modifications in details of design, constructions or operation may be made without departing from the present invention.