170 likes | 334 Views
Rectangle Image Compression. Jiří Komzák. Department of Computer Science and Engineering, Czech Technical University (CTU). Overview. Introduction Existing Methods Rectangle Method Description Rectangle Method Specifics Comparison To Existing Methods Future Work. Introduction.
E N D
Rectangle Image Compression Jiří Komzák Department of Computer Science and Engineering, Czech Technical University (CTU)
Overview • Introduction • Existing Methods • Rectangle Method Description • Rectangle Method Specifics • Comparison To Existing Methods • Future Work
Introduction • Compression Need • storage space is always small • limited bandwidth of networks • History • text applications at first • extension into 2 and more dimensions • Compression - redundancy reduction
Introduction • Compression ratio = compressed/original size • Fast Decompression Need • Lossless Compression - allows exact reconstruction • Use of Spatial Context
Existing similar methods • Lossless compression • RLE • Quad-trees • Space Filling Curves • Lossy compression • integral transforms - DCT, DWT • Iterated Function Systems - repeatedly used transformations (fractal compression)
Existing similar methods • RLE - horizontal strings • Quad-trees - squares
Existing similar methods • Space Filling Curves • area is covered by a parametric function (Hilbert Curve) • quad-tree is a special case of space filling function Hilbert Curve
Rectangle Method Description • Lossless method based on idea similar to RLE but in two dimensions • Splits image into rectangles with identical colors
Rectangle Method Description Compressed image and image with first eight rectangles
Rectangle Method Description • Simple row strings remain in areas with big color variability • Method of finding rectangles - heuristic • Rectangles with same color can overlap to cover more pixels
Rectangle Method Description Fully coded image and illustration of overlapping
Rectangle Method Parameters • sizes - influence code efficiency • minimal rectangle size - number of noncoded pixels in just created rectangle • minimal length of noncoded string of pixels • split control and data bytes • for consequential use of other compression is useful to save it separately
Method Specifics • strong in coding horizontal lines as well as vertical ones and rectangular areas • poor in coding continuos-tone images (no coding) • suitable for images „painted by hand“ or cartoons (images with larger areas with identical color) • unsymmetrical - encoding takes more time vs. decoding is very fast
Images used for testing (Waterloo BragZone - http://links.uwaterloo.ca/bragzone.base.html)
Results - Comparison all values are ratios of file sizes multiplied by 100% • BMP - Windows Bitmap • RLE - Windows Bitmap with RLE • QT - Quad-tree (my implementation) • GIF - Graphics Interchange Format • RC - Rectangle Compression • better than BMP, RLE, QT • other than GIF
Results - Comparison - ARJ’d all values are ratios of file sizes after using ARJ compressor multiplied by 100% • BMP - Windows Bitmap • RLE - Windows Bitmap with RLE • QT - Quad-tree (my implementation) • GIF - Graphics Interchange Format • RC - Rectangle Compression • RC-S - Rectangle Compression with Control and Data Bytes Saved Separately • better than QT, GIF • worse than BMP • RC-S is better than RC
Future Work • Implementation of optional arithmetic or LZW coding • Extension into 3D • Lossy compression • how determine significance of pixels • separation of noise and thin lines or texture