Library     -    of technical articles along with code samples supported by Andrew Polar
Patented Image Compression

Reversible compression of low order bits in digital images
(Method is patented in U.S. 7315266)

The compression of high quality photographic images is performed based on similarities in rows, columns, colors or separated repeated fragments. There is, however, one more correlation that is slipped out of attention or researchers. It is correlation between high order bits and low order bits within RGB structure. This correlation exists not in every image but in many of them, for example in known published 24 Kodak images used by many companies for compression benchmarks ( bitjazz , for example). This correlation is so strong that image palette can be used as look up table for prediction of low order bits based on high order counter part and low order bits can be compressed separately and independently from high order bits. This leads to possibility of improvement of any existing algorithm by excluding low order bits and processing them separately. The details along with code sample can be found in the article Reversible Compression of Low Order Bits in Digital Images

Table 2. below contains the comparison of compression ratios with and without separate processing of low order bits. The images are compressed by the method close to one published in article of S.A. Martucci 'Reversible compression of HDTV images using median adaptive prediction and arithmetic coding' in Proceedings of IEEE ISCAS, May 1990, pp. 1310-1313. The ratios are shown in coupled figures as 2.26/2.69. The number shown on the top 2.26 is compression ratio when only mentioned above method is applied. The number below 2.69 is compression ratio achieved when same algorithm was used along with suggested technique of separate processing of low order bits. Average improvement is about 18 percent. Both methods are lossless. Establishing a record was not an objective. The goal was to compare results for separate processing of low order bits, because the same technique can be used along with other, possibly, more effective methods (wavelet transforms, for example). Some comparison to other software is shown in table 1. The number in the table is total size of all 24 files when compression is applied separately to each of them. All original images are 768 * 512 RGB (that is 28,311,552 bytes). The list of companies is limited to those whose programs are easy available for test. It is not even close to some sort of exhaustive set and there are other companies and software versions that claim better compression but not freely available for testing or need significant time to install and test. To avoid misleading of visitors I have to add that very impressive compression by PAQ8P achieved for very long time such as about 36 seconds per image, while all other programs did it for sort of reasonable time between 1 and 3 sec.

Table 1. Overall compression for 24 images with different programs
MethodMartucci 1990JPEG2000WinRK 2.1.6 This articleHD PhotoPAQ8PBMF v.1.1 Option -F
ReferenceIEEE ISCAS Luratech WinRK this method dpktools.zip PAQ8P BMF
Size12,005,20311,327,77611,945,646 10,196,432 12,855,4658,281,91810,992,592


Table 2. Individual compression ratios with and without separate processing of low-order bits
2.26 / 2.69
2.39 / 2.91
2.81 / 3.29
2.33 / 2.78
2.04 / 2.35
2.33 / 2.75
2.68 / 3.17
2.08 / 2.38
2.58 / 3.14
2.54 / 3.07
2.37 / 2.85
2.70 / 3.16
1.91 / 2.21
2.15 / 2.52
2.42 / 2.74
2.63 / 3.17
2.48 / 3.02
2.01 / 2.36
2.30 / 2.77
2.97 / 3.25
2.28 / 2.73
2.17 / 2.55
2.60 / 2.97
2.22 / 2.56