Bezztrátová komprese JPEG grafiky
Lossless JPEG compression
diploma thesis (DEFENDED)
![Document thumbnail](/bitstream/handle/20.500.11956/30666/thumbnail.png?sequence=7&isAllowed=y)
View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/30666Identifiers
Study Information System: 49840
Collections
- Kvalifikační práce [11266]
Author
Advisor
Referee
Žemlička, Michal
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Theoretical Computer Science
Department
Department of Software Engineering
Date of defense
21. 9. 2009
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
Czech
Grade
Very good
JPEG je široce rozšířená metoda komprese grafiky určená především pro ukládání fotografií. Skládá se ze ztrátové a bezztrátové části. Poslední fází je statické Huffmanovo kódování, které lze nahradit pokročilejšími adaptivními technikami ve spojení s aritmetickým kódováním. V této práci je představena metoda použitá pro kompresi souborů JPEG (soubory formátu JFIF) uložených v sekvenčním (baseline) režimu. Obecným postupem je v tomto případě částečná dekomprese, při které invertujeme pouze poslední bezztrátové fáze kompresního algoritmu. Tím převedeme komprimovaný soubor dat na pole kvantovaných DCT koeficientů. Zde je navržen algoritmus pro predikci těchto DCT koeficientů. Ten funguje tak, že vrací jako výsledek pro každý z 64 koeficientů vhodnou lineární kombinaci už zakódovaných koeficientů z aktuálního bloku a okolních bloků. Také se seznámíme s tím, jak je možné využít této predikce k vylepšení výkonu komprese JPEG souboru pomocí Context Mixing algoritmu v programu PAQ8 od Matta Mahoneyho. Dále je uvedena konkrétní implementace a otestován její výkon ve srovnání s existujícími metodami nebo algoritmy na kompresi JPEG grafiky.
JPEG is a commonly used method of compression for photographic images. It consists of lossy and lossless part. Static Huffman coding is a last step. We can replace this step using advanced techniques and arithmetic coding. In this work we introduce method used for additional compression JPEG files (files in JFIF format) saved in baseline mode. Partial decompression is a general way we can use in this case. We invert only last lossless steps of JPEG compression algorithm. Compressed file is transformed into array of quantized DCT coefficients. We designed algorithm for prediction of the DCT coefficients. It returns particular linear combination of previous coded coefficients in current and neighbouring blocks for each from 64 coefficients in block matrix. We show how this prediction can improve efficiency of compression of JPEG files using Context Mixing algorithm implemented in PAQ8 by Matt Mahoney. Specific implementation is described and its compression ratio is compared with existing methods and applications for further lossless JPEG images compression.