Speeding up Lossless Image Compression Experimental Results on

  • Slides: 13
Download presentation
Speeding up Lossless Image Compression: Experimental Results on a Parallel Machine Luigi Cinque and

Speeding up Lossless Image Compression: Experimental Results on a Parallel Machine Luigi Cinque and Sergio De Agostino Computer Science Department Sapienza University of Rome ITALY Luca Lombardi Computer Science Department University of Pavia ITALY

Lossless image compression by block matching has a linear time implementation on bi-level images

Lossless image compression by block matching has a linear time implementation on bi-level images by means of a square greedy matching heuristic. Storer [1996], Proc. IEEE Data Compression Conf. how to compute a square match 4 x 4

The Compression Scheme The image is read by a raster scan and the matching

The Compression Scheme The image is read by a raster scan and the matching algorithm works with a perfect hashing table with one position for each possible 4 x 4 subarray. All-zero and all-one squares are handled differently. Each pointer starts with a flag field indicating whethere is a monochromatic square (0 for white, 10 for black), a match (110) or raw data (111).

If the 4 x 4 subarray in position (i, j) is monochromatic, then we

If the 4 x 4 subarray in position (i, j) is monochromatic, then we compute the largest monochromatic square in that position and encode the side length. Otherwise we compute the largest square match in the position provided by the hash table, encode its position and side length, and update the table with the current position. If the subarray is not hashed, then it is left uncompressed and added to the hash table with its current position. The positions covered by matches are skipped in the linear scan of the image.

Dealing with square matches, we were able to partition an image into up to

Dealing with square matches, we were able to partition an image into up to a hundred areas and to apply the BLOCK MATCHING heuristic independently to each area with no loss of compression effectiveness. In order to implement decompression on an array of processors, we indicate the end of the encoding of an area with 1111 changing the flag field 111 to 1110. We obtained the expected speed up of the compression and decompression times, achieving parallel running times about twenty-five times faster than the sequential ones with up to 32 processors of a 256 Intel Xeon 3. 06 GHz processors machine in Italy (avogadro. cilea. it) on a test set of large topographic bi-level images.

The extension of the BLOCK MATCHING method to grey scale and color images is

The extension of the BLOCK MATCHING method to grey scale and color images is not feasible since the high cardinality of the alphabet causes an exponential blow-up of the hash table. Grey scale and color image compression relies on the fact that most of the times there are minimal variations of color in the neighborood of one pixel. There exists an extremely local procedure which is able to achieve a satisfying degree of compression by working independently on 8 x 8 pixels blocks. Cinque, De Agostino, Liberati and Westgeest [2006]. Int. J. Of Foundations of Computer Science

The PALIC Compressor The PALIC (Parallelizable Lossless Image Compression) compressor employs a header and

The PALIC Compressor The PALIC (Parallelizable Lossless Image Compression) compressor employs a header and a fixed length code to encode each 8 x 8 pixels block. Two different techniques may be applied to the block. One is to encode the difference between the pixel value and the smallest one in the block. The other one is the simple idea of reducing the alphabet size by looking at the values occurring in the block.

The heuristic may be applied to the four sub-blocks of 16 pixels if better

The heuristic may be applied to the four sub-blocks of 16 pixels if better compression is achieved. If this is not the case, the first bit of the header is set to 1. Then a second field of 3 -bits (but 110 and 111) stores the number of bits required to encode the distance between the smallest pixel value and every other pixel value in the block. A third field of 8 -bits stores the smallest pixel value and then the distances are given.

If the second field is 110, the reduced alphabet technique is applied. An additional

If the second field is 110, the reduced alphabet technique is applied. An additional three bits field stores the reduced alphabet size d in the range from 2 to 9. The last componenent of the header is the alphabet itself, a concatenation of d bytes. A code of fixed length log(d) is used to encode the block. If the second field is 111, the block is not compressed.

If the first bit of the header is set to 0 then four 3

If the first bit of the header is set to 0 then four 3 -bits fields follow the flag bit, one for each 4 x 4 block. If a field is 111, then it is followed by three more bits. If they are 110, the first technique with distances expressed by seven bits is applied to the sub-block. If they are 111, the sub-block is not compressed. Otherwise, they encode a reduced alphabet size in the range from 2 to 7 and the alphabet follows.

The PALIC compressor works on color images by applying the procedure to each component.

The PALIC compressor works on color images by applying the procedure to each component. We experimented PALIC on a test set of five large topographic images in RGB format (4096 x 4096 pixels). We obtained the expected speed up of the compression and decompression times, achieving parallel running times about twenty-five times faster than the sequential ones with up to 32 processors of the 256 Intel Xeon 3. 06 GHz processors machine in Italy (avogadro. cilea. it) as with bi-level images.

Image 1 image 1 2 3 4 5 Avg. image 2 image 3 image

Image 1 image 1 2 3 4 5 Avg. image 2 image 3 image 4 1 proc. 2 proc. 4 proc. 8 proc 16 proc. 32 proc. 227 243 235 236 232 234. 6 117 120 118 131 113 119. 8 57 69 72 71 67 67. 2 34 33 35 34 30 33. 2 17 16 16 16. 4 9 10 9 9 11 9. 6 PALIC compression times (cs. )

Image 1 image 1 2 3 4 5 Avg. image 2 image 3 image

Image 1 image 1 2 3 4 5 Avg. image 2 image 3 image 4 1 proc. 2 proc. 4 proc. 8 proc 16 proc. 32 proc. 128 133 130 129 123 128. 6 65 66 66 91 95 76. 6 32 35 44 36 46 38. 6 18 21 21 20 17 19. 4 11 10 13 10 10 10. 8 6 6 6 5 5 5. 6 PALIC decompression times (cs. )