A New Operating Tool for A New Operating Tool for Coding Coding in Lossless Image in Lossless Image Compression Compression Radu Rădescu University POLITEHNICA of Bucharest, Faculty of Electronics, Telecommunications and Information Technology Department of Applied Electronics and Information Engineering
16
Embed
A New Operating Tool for Coding in Lossless Image Compression Radu Rădescu University POLITEHNICA of Bucharest, Faculty of Electronics, Telecommunications.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
A New Operating Tool for A New Operating Tool for Coding Coding
in Lossless Image in Lossless Image CompressionCompression
Radu Rădescu
University POLITEHNICA of Bucharest,
Faculty of Electronics, Telecommunications and Information Technology
Department of Applied Electronics and Information Engineering
OC 2009, Varna, Bulgaria
1. Introduction1. Introduction
The application carries out the encoding for images with at most as 255 colors.
As source, the program accepts BMP files, represented on 8, 16 or 32 bits.
The application has an algorithm to reduce the color depth to 255 colors.
As output, the application produces two file types, named after the encoding type used to make them:
LZW, RLC.
2. 2. Implementing the Implementing the compression (a)compression (a)
The algorithm: The colors are stored in a table, which is built
as the image is run through pixel by pixel. If the color of the pixel exists in the table,
it is ignored. If not, it is added to the table. Data storage is used, so that the search time
for the color table can be substantially reduced.
2. 2. Implementing the Implementing the compression (b)compression (b)
The encoding flexibility: In the case of LZW, a variable size dictionary
is used, with 2048, 4096 or 8192 positions. In the case of RLC, there are two ways to
run through the image: up and down orleft to right,
which exploits in different ways the image correlation.
2. 2. Implementing the Implementing the compression (c)compression (c)
Reducing the number of colors: The algorithm is based on the nearest
color method, computed based on the mean square algorithm.
The generated color palette is a joint one, including 128 standard colors, allocated equally in the color space.
Other 127 colors are calculated based on the bar graph of the image.
3. 3. Experimental results Experimental results (g)(g) The LZW and RLC image files are compared
to the original BMP format and to the archived RAR files.
The compression ratio is superior to GIF because of a better saving of coded words in files and of the built color palette obtained by the exact colors in the image.
The application has an advantage before the GIF compression as the file size is growing and the color number is decreasing.
3. 3. Experimental results Experimental results (h)(h)The performance of coding for 255 colors
The result does not depend much on the number of colors from the input image, but on the size of the source file.
The RLC compression depends more on the correlation within the image.
In the case of the 16 color images, the RLE compression for the BMP format (with the combination of two pixels on the same byte) is superior to the RLC format encoding.
Exceptions are images that, after decreasing the number of colors, have become more correlated, in advantage of the RLC encoding.