Data Compression Data Compression Compression Reduces the Size of a File: to Save TIME When Transmitting It

Total Page:16

File Type:pdf, Size:1020Kb

Data Compression Data Compression Compression Reduces the Size of a File: to Save TIME When Transmitting It Data Compression Data Compression Compression reduces the size of a file: To save TIME when transmitting it. To save SPACE when storing it. Most files have lots of redundancy. Run Length Encoding Huffman Encoding Who needs compression? Entropy Moore's law: # transistors on a chip doubles every 18-24 months. LZW Parkinson's law: data expands to fill space available. Text, images, sound, video, . nd All of the books in the world contain no more information than is Reference: Chapter 22, Algorithms in C, 2 Edition, Robert Sedgewick. broadcast as video in a single large American city in a single year. Reference: Introduction to Data Compression, Guy Blelloch. Not all bits have equal value. -Carl Sagan Basic concepts ancient (1950s), best technology recently developed. Princeton University • COS 226 • Algorithms and Data Structures • Spring 2004 • Kevin Wayne • http://www.Princeton.EDU/~cos226 2 Applications of Data Compression Encoding and Decoding Generic file compression. Message. Binary data M we want to compress. Files: GZIP, BZIP, BOA. Encode. Generate a "compressed" representation C(M) that hopefully uses fewer bits. Archivers: PKZIP. Decode. Reconstruct original message or some approximation M'. File systems: NTFS. Multimedia. M Encoder C(M) Decoder M' Images: GIF, JPEG, CorelDraw. Sound: MP3. Video: MPEG, DivX™, HDTV. Compression ratio: bits in C(M) / bits in M. Communication. Lossless. M = M', 50-75% or lower. ITU-T T4 Group 3 Fax. Ex: Java source code, executables. V.42bis modem. Lossy. M ~ M', 10% or lower. Databases. Ex: images, sound, video. Google. 3 4 Simple Ideas Run-Length Encoding ASCII coding Ancient ideas. Natural encoding: 51 P 19 + 6 = 975 bits. char dec binary P Human language. Run-length encoding: 63 6 + 6 = 384 bits. NUL 0 0000000 Morse code. … … … Braille. > 62 0111110 000000000000000000000000000011111111111111000000000 28 14 9 ? 63 0111111 000000000000000000000000001111111111111111110000000 26 18 7 000000000000000000000001111111111111111111111110000 23 24 4 Fixed length coding. @ 64 1000000 000000000000000000000011111111111111111111111111000 22 26 3 A 65 1000001 000000000000000000001111111111111111111111111111110 20 30 1 Use same number of bits for each symbol. 000000000000000000011111110000000000000000001111111 19 7 18 7 B 66 1000010 000000000000000000011111000000000000000000000011111 19 5 22 5 N symbols !log N1 bits per symbol. C 67 1000011 000000000000000000011100000000000000000000000000111 19 3 26 3 000000000000000000011100000000000000000000000000111 19 3 26 3 7-bit ASCII code for text. … … … 000000000000000000011100000000000000000000000000111 19 3 26 3 ~ 126 1111110 000000000000000000011100000000000000000000000000111 19 3 26 3 000000000000000000001111000000000000000000000001110 20 4 23 3 1 DEL 127 1111111 000000000000000000000011100000000000000000000111000 22 3 20 3 3 011111111111111111111111111111111111111111111111111 1 50 011111111111111111111111111111111111111111111111111 1 50 011111111111111111111111111111111111111111111111111 1 50 a b r a c a d a b r a 011111111111111111111111111111111111111111111111111 1 50 1100001 1100010 1110010 1100001 1100011 1100001 1110100 1100001 1100010 1110010 1100001 011111111111111111111111111111111111111111111111111 1 50 011000000000000000000000000000000000000000000000011 1 2 46 2 7 P 11 = 77 bits raster of letter 'q' lying on its side RLE 5 7 Run-Length Encoding Variable Length Encoding Run-length encoding (RLE). Variable-length encoding. Exploit long runs of repeated characters. Use DIFFERENT number of bits to encode different characters. Replace run by count followed by repeated character, but don't bother if run is less than 3. – AAAABBBAABBBBBCCCCCCCCDABCBAAABBBBCCCD Char Freq Char Freq E 12.51 M 2.53 – 4A3BAA5B8CDABCB3A4B3CD T 9.25 F 2.30 Annoyance: how to represent counts. A 8.04 P 2.00 O 7.60 G 1.96 Runs in binary file alternate between 0 and 1, so output count only. I 7.26 W 1.92 "File inflation" if runs are short. N 7.09 Y 1.73 S 6.54 B 1.54 R 6.12 V 0.99 Applications. H 5.49 K 0.67 Black and white graphics. L 4.14 X 0.19 D 3.99 J 0.16 – compression ratio improves with resolution! C 3.06 Q 0.11 JPEG (Joint Photographic Experts Group). U 2.71 Z 0.09 Linotype machine, 1886 8 9 Variable Length Encoding Variable Length Decoding Variable-length encoding. But, then how do we decode? Variable length codes can be ambiguous. Use DIFFERENT number of bits to encode different characters. char encoding a b r a c a d a b r a a 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 b 0 c r a a d b a c r a c 10 a b r a c a d a b r a d 01 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 r 00 3-bit fixed length coding: 3 P 11 = 33 bits How do we avoid ambiguity? One solution: ensure no encoding is a prefix of another. Ex: 00 is a prefix of 0001. char encoding char encoding a 1 a 1 a b r a c a d a b r a b 001 a b r a c a d a b r a b 001 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 1 c 0000 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 1 c 0000 d 0001 d 0001 variable length coding: 23 bits r 01 r 01 10 11 Prefix-Free Code: Implementation How to Transmit the Trie How to represent? Use a binary trie. 0 1 How to transmit the trie? 0 1 – symbols are stored in leaves Send lookup table. a a 0 1 0 1 – encoding is path to leaf Send preorder traversal of trie. 0 1 r – we use * as sentinel for internal nodes 0 1 r – what if there is no sentinel? b b Encoding. 0 1 0 1 Method 1: start at leaf corresponding to ****cdbra symbol, follow path up to the root, and c d 10010110000100011001011 c d print bits in reverse order. Method 2: create ST of symbol-encoding pairs. char encoding char encoding If message is long, overhead of sending trie is small. Decoding. a 1 a 1 b 001 b 001 Start at root of tree. c 0000 c 0000 Take left branch if bit is 0; right branch if 1. d 0001 d 0001 If leaf node, print symbol and return to root. r 01 r 01 12 13 Prefix-Free Decoding Implementation: Recall COS 126 Huffman Coding public class HuffmanDecoder { OK, but how do I find a good prefix-free coding scheme? Greed. private char c; private HuffmanDecoder left, right; To compute Huffman prefix-free code: public HuffmanDecoder() { build tree from Count character frequencies p for each symbol s in file. c = CharStdIn.readChar(); preorder traversal s if (c == '*') { Start with a forest of trees, each consisting of a single vertex left = new HuffmanDecoder(); c*d*b*r*a right = new HuffmanDecoder(); corresponding to each symbol s with weight ps. } Repeat: } 10010110000100011001011 – select two trees with min weight p1 and p2 public void decode() { use bits in real applications – merge into single tree with weight p1 +p2 HuffmanDecoder x = this; instead of chars while(!CharStdIn.isEmpty()) { char bit = CharStdIn.readChar(); if (bit == '0') x = x.left; else if (bit == '1') x = x.right; Applications: JPEG, MP3, MPEG, PKZIP. if (x.left == null && x.right == null) { System.out.print(x.c); x = this; } } } 14 15 Huffman Coding Example Huffman Tree Implementation Char Freq Huff private class HuffmanTree implements Comparable { char c; E 125 110 int freq; 838 T 93 011 HuffmanTree left, right; A 80 000 O 76 001 330 508 // print preorder traversal void preorder() { I 73 1011 System.out.print(c); N 71 1010 156 174 270 if (left != null && right != null) { S 65 1001 238 left.preorder(); R 61 1000 A O T E right.preorder(); H 55 1111 80 76 81 93 126 144 125 113 } } L 41 0101 D L R S N I H D 40 0100 40 41 61 65 71 73 58 55 ... C 31 11100 C U U 27 11101 } 31 27 Total 838 3.62 16 17 Huffman Encoding Implementation Huffman Encoding public HuffmanEncoder(String input) { Theorem (Huffman, 1952). Huffman coding is optimal prefix-free code. // tabulate frequencies No variable length code uses fewer bits. int[] freq = new int[SYMBOLS]; for (int i = 0; i < input.length(); i++) freq[input.charAt(i)]++; Corollary. Greed is good. // initialize priority queue with singleton elements PQ pq = new PQ(); Implementation. for (int i = 0; i < SYMBOLS; i++) if (freq[i]>0) Two passes. pq.insert(new HuffmanTree((char) i, freq[i], null, null)); – tabulate symbol frequencies and build trie // repeatedly merge two smallest trees – encode file by traversing trie or lookup table while (pq.size() > 1) { Use priority queue for delete min and insert. HuffmanTree x =(HuffmanTree) pq.delMin(); HuffmanTree y =(HuffmanTree) pq.delMin(); O(M + N log N). HuffmanTree parent = new HuffmanTree('*', x.freq + y.freq, x, y); M = file size pq.insert(parent); PQ implementation important if each N = # distinct symbols } symbol represents one English word internal node tree =(HuffmanTree) pq.delMin(); } Difficulties. root of Huffman tree Have to transmit encoding (trie). Not optimal (unless block size grows to infinity)! 18 19 What Data Can be Compressed? What Data Can be Compressed? US Patent 5,533,051 on "Methods for Data Compression." Impossible to losslessly compress all files. Capable of compressing all files. Consider all 1000 bit messages. 1000 2 possible messages. 999 998 Slashdot reports of the Zero Space Tuner™ and BinaryAccelerator™. Only 2 + 2 + … + 1 can be encoded with ? 999 bits. 499 Only 1 in 2 can even be encoded with ? 500 bits! "ZeoSync has announced a breakthrough in data compression that allows for 100:1 lossless compression of random data.
Recommended publications
  • A Practical Approach to Spatiotemporal Data Compression
    A Practical Approach to Spatiotemporal Data Compres- sion Niall H. Robinson1, Rachel Prudden1 & Alberto Arribas1 1Informatics Lab, Met Office, Exeter, UK. Datasets representing the world around us are becoming ever more unwieldy as data vol- umes grow. This is largely due to increased measurement and modelling resolution, but the problem is often exacerbated when data are stored at spuriously high precisions. In an effort to facilitate analysis of these datasets, computationally intensive calculations are increasingly being performed on specialised remote servers before the reduced data are transferred to the consumer. Due to bandwidth limitations, this often means data are displayed as simple 2D data visualisations, such as scatter plots or images. We present here a novel way to efficiently encode and transmit 4D data fields on-demand so that they can be locally visualised and interrogated. This nascent “4D video” format allows us to more flexibly move the bound- ary between data server and consumer client. However, it has applications beyond purely scientific visualisation, in the transmission of data to virtual and augmented reality. arXiv:1604.03688v2 [cs.MM] 27 Apr 2016 With the rise of high resolution environmental measurements and simulation, extremely large scientific datasets are becoming increasingly ubiquitous. The scientific community is in the pro- cess of learning how to efficiently make use of these unwieldy datasets. Increasingly, people are interacting with this data via relatively thin clients, with data analysis and storage being managed by a remote server. The web browser is emerging as a useful interface which allows intensive 1 operations to be performed on a remote bespoke analysis server, but with the resultant information visualised and interrogated locally on the client1, 2.
    [Show full text]
  • (A/V Codecs) REDCODE RAW (.R3D) ARRIRAW
    What is a Codec? Codec is a portmanteau of either "Compressor-Decompressor" or "Coder-Decoder," which describes a device or program capable of performing transformations on a data stream or signal. Codecs encode a stream or signal for transmission, storage or encryption and decode it for viewing or editing. Codecs are often used in videoconferencing and streaming media solutions. A video codec converts analog video signals from a video camera into digital signals for transmission. It then converts the digital signals back to analog for display. An audio codec converts analog audio signals from a microphone into digital signals for transmission. It then converts the digital signals back to analog for playing. The raw encoded form of audio and video data is often called essence, to distinguish it from the metadata information that together make up the information content of the stream and any "wrapper" data that is then added to aid access to or improve the robustness of the stream. Most codecs are lossy, in order to get a reasonably small file size. There are lossless codecs as well, but for most purposes the almost imperceptible increase in quality is not worth the considerable increase in data size. The main exception is if the data will undergo more processing in the future, in which case the repeated lossy encoding would damage the eventual quality too much. Many multimedia data streams need to contain both audio and video data, and often some form of metadata that permits synchronization of the audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data stream to be useful in stored or transmitted form, they must be encapsulated together in a container format.
    [Show full text]
  • Multimedia Compression Techniques for Streaming
    International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-8 Issue-12, October 2019 Multimedia Compression Techniques for Streaming Preethal Rao, Krishna Prakasha K, Vasundhara Acharya most of the audio codes like MP3, AAC etc., are lossy as Abstract: With the growing popularity of streaming content, audio files are originally small in size and thus need not have streaming platforms have emerged that offer content in more compression. In lossless technique, the file size will be resolutions of 4k, 2k, HD etc. Some regions of the world face a reduced to the maximum possibility and thus quality might be terrible network reception. Delivering content and a pleasant compromised more when compared to lossless technique. viewing experience to the users of such locations becomes a The popular codecs like MPEG-2, H.264, H.265 etc., make challenge. audio/video streaming at available network speeds is just not feasible for people at those locations. The only way is to use of this. FLAC, ALAC are some audio codecs which use reduce the data footprint of the concerned audio/video without lossy technique for compression of large audio files. The goal compromising the quality. For this purpose, there exists of this paper is to identify existing techniques in audio-video algorithms and techniques that attempt to realize the same. compression for transmission and carry out a comparative Fortunately, the field of compression is an active one when it analysis of the techniques based on certain parameters. The comes to content delivering. With a lot of algorithms in the play, side outcome would be a program that would stream the which one actually delivers content while putting less strain on the audio/video file of our choice while the main outcome is users' network bandwidth? This paper carries out an extensive finding out the compression technique that performs the best analysis of present popular algorithms to come to the conclusion of the best algorithm for streaming data.
    [Show full text]
  • CALIFORNIA STATE UNIVERSITY, NORTHRIDGE Optimized AV1 Inter
    CALIFORNIA STATE UNIVERSITY, NORTHRIDGE Optimized AV1 Inter Prediction using Binary classification techniques A graduate project submitted in partial fulfillment of the requirements for the degree of Master of Science in Software Engineering by Alex Kit Romero May 2020 The graduate project of Alex Kit Romero is approved: ____________________________________ ____________ Dr. Katya Mkrtchyan Date ____________________________________ ____________ Dr. Kyle Dewey Date ____________________________________ ____________ Dr. John J. Noga, Chair Date California State University, Northridge ii Dedication This project is dedicated to all of the Computer Science professors that I have come in contact with other the years who have inspired and encouraged me to pursue a career in computer science. The words and wisdom of these professors are what pushed me to try harder and accomplish more than I ever thought possible. I would like to give a big thanks to the open source community and my fellow cohort of computer science co-workers for always being there with answers to my numerous questions and inquiries. Without their guidance and expertise, I could not have been successful. Lastly, I would like to thank my friends and family who have supported and uplifted me throughout the years. Thank you for believing in me and always telling me to never give up. iii Table of Contents Signature Page ................................................................................................................................ ii Dedication .....................................................................................................................................
    [Show full text]
  • Data Compression Using Pre-Generated Dictionaries
    Technical Disclosure Commons Defensive Publications Series January 2020 Data compression using pre-generated dictionaries Simon Cooke Follow this and additional works at: https://www.tdcommons.org/dpubs_series Recommended Citation Cooke, Simon, "Data compression using pre-generated dictionaries", Technical Disclosure Commons, (January 16, 2020) https://www.tdcommons.org/dpubs_series/2876 This work is licensed under a Creative Commons Attribution 4.0 License. This Article is brought to you for free and open access by Technical Disclosure Commons. It has been accepted for inclusion in Defensive Publications Series by an authorized administrator of Technical Disclosure Commons. Cooke: Data compression using pre-generated dictionaries Data compression using pre-generated dictionaries ABSTRACT A file is compressed by replacing its characters by codes that are dependent on the statistics of the characters. The character-to-code table, known as the dictionary, is typically incorporated into the compressed file. Popular compression schemes reach theoretical compression limit only asymptotically. Small files or files without much intra-file redundancy, either compress poorly or not at all. This disclosure describes techniques that achieve superior compression, even for small files or files without much intra-file redundancy, by independently maintaining the dictionary at the transmitting and receiving ends of a file transmission, such that the dictionary does not need to be incorporated into the compressed file. KEYWORDS ● Data compression ● Codec dictionary ● Compression dictionary ● Compression ratio ● Page load speed ● Webpage download ● Shannon limit ● Webpage compression ● JavaScript compression ● Web browser Published by Technical Disclosure Commons, 2020 2 Defensive Publications Series, Art. 2876 [2020] BACKGROUND A file is compressed by replacing its characters by codes that are dependent on the statistics of the characters.
    [Show full text]
  • Lossy Audio Compression Identification
    2018 26th European Signal Processing Conference (EUSIPCO) Lossy Audio Compression Identification Bongjun Kim Zafar Rafii Northwestern University Gracenote Evanston, USA Emeryville, USA [email protected] zafar.rafi[email protected] Abstract—We propose a system which can estimate from an compression parameters from an audio signal, based on AAC, audio recording that has previously undergone lossy compression was presented in [3]. The first implementation of that work, the parameters used for the encoding, and therefore identify the based on MP3, was then proposed in [4]. The idea was to corresponding lossy coding format. The system analyzes the audio signal and searches for the compression parameters and framing search for the compression parameters and framing conditions conditions which match those used for the encoding. In particular, which match those used for the encoding, by measuring traces we propose a new metric for measuring traces of compression of compression in the audio signal, which typically correspond which is robust to variations in the audio content and a new to time-frequency coefficients quantized to zero. method for combining the estimates from multiple audio blocks The first work to investigate alterations, such as deletion, in- which can refine the results. We evaluated this system with audio excerpts from songs and movies, compressed into various coding sertion, or substitution, in audio signals which have undergone formats, using different bit rates, and captured digitally as well lossy compression, namely MP3, was presented in [5]. The as through analog transfer. Results showed that our system can idea was to measure traces of compression in the signal along identify the correct format in almost all cases, even at high bit time and detect discontinuities in the estimated framing.
    [Show full text]
  • What Is Ogg Vorbis?
    Ogg Vorbis Audio Compression Format Norat Rossello Castilla 5/18/2005 Ogg Vorbis 1 What is Ogg Vorbis? z Audio compression format z Comparable to MP3, VQF, AAC, TwinVQ z Free, open and unpatented z Broadcasting, radio station and television by internet ( = Streaming) 5/18/2005 Ogg Vorbis 2 1 About the name… z Ogg = name of Xiph.org container format for audio, video and metadata z Vorbis = name of specific audio compression scheme designed to be contained in Ogg FOR MORE INFO... https://www.xiph.org 5/18/2005 Ogg Vorbis 3 Some comercial characteristics z The official mime type was approved in February 2003 z Posible to encode all music or audio content in Vorbis z Designed to not be proprietary or patented audio format z Patent and licensed-free z Specification in public domain 5/18/2005 Ogg Vorbis 4 2 Audio Compression z Two classes of compression algorithms: - Lossless - Lossy FOR MORE INFO... http://www.firstpr.com.au/audiocomp 5/18/2005 Ogg Vorbis 5 Lossless algorithms z Produce compressed data that can be decoded to output that is identical to the original. z Zip, FLAC for audio 5/18/2005 Ogg Vorbis 6 3 Lossy algorithms z Discard data in order to compress it better than would normally be possible z VORBIS, MP3, JPEG z Throw away parts of the audio waveform that are irrelevant. 5/18/2005 Ogg Vorbis 7 Ogg Vorbis - Compression Factors z Vorbis is an audio codec that generates 16 bit samples at 16KHz to 48KHz, providing variable bit rates from 16 to 128 Kbps per channel FOR MORE INFO..
    [Show full text]
  • Data Compression a Comparison of Methods
    OMPUTER SCIENCE & TECHNOLOGY: Data Compression A Comparison of Methods NBS Special Publication 500-12 U.S. DEPARTMENT OF COMMERCE 00-12 National Bureau of Standards NATIONAL BUREAU OF STANDARDS The National Bureau of Standards^ was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology and facilitate their effective application for public benefit. To this end, the Bureau conducts research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to pro- mote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology, the Institute for Computer Sciences and Technology, the Office for Information Programs, and the Office of Experimental Technology Incentives Program. THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United States of a complete and consist- ent system of physical measurement; coordinates that system with measurement systems of other nations; and furnishes essen- tial services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of the Office of Measurement Services, and the following center and divisions: Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Center for Radiation Research — Lab- oratory Astrophysics- — Cryogenics^ — Electromagnetics' — Time and Frequency". THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to improved methods of measure- ment, standards, and data on the properties of well-characterized materials needed by industry, commerce, educational insti- tutions, and Government; provides advisory and research services to other Government agencies; and develops, produces, and distributes standard reference materials.
    [Show full text]
  • Methods of Sound Data Compression \226 Comparison of Different Standards
    See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/251996736 Methods of sound data compression — Comparison of different standards Article CITATIONS READS 2 151 2 authors, including: Wojciech Zabierowski Lodz University of Technology 123 PUBLICATIONS 96 CITATIONS SEE PROFILE Some of the authors of this publication are also working on these related projects: How to biuld correct web application View project All content following this page was uploaded by Wojciech Zabierowski on 11 June 2014. The user has requested enhancement of the downloaded file. 1 Methods of sound data compression – comparison of different standards Norbert Nowak, Wojciech Zabierowski Abstract - The following article is about the methods of multimedia devices, DVD movies, digital television, data sound data compression. The technological progress has transmission, the Internet, etc. facilitated the process of recording audio on different media such as CD-Audio. The development of audio Modeling and coding data compression has significantly made our lives One's requirements decide what type of compression he easier. In recent years, much has been achieved in the applies. However, the choice between lossy or lossless field of audio and speech compression. Many standards method also depends on other factors. One of the most have been established. They are characterized by more important is the characteristics of data that will be better sound quality at lower bitrate. It allows to record compressed. For instance, the same algorithm, which the same CD-Audio formats using "lossy" or lossless effectively compresses the text may be completely useless compression algorithms in order to reduce the amount in the case of video and sound compression.
    [Show full text]
  • Data Compression
    Data Compression Data Compression Compression reduces the size of a file: ! To save space when storing it. ! To save time when transmitting it. ! Most files have lots of redundancy. Who needs compression? ! Moore's law: # transistors on a chip doubles every 18-24 months. ! Parkinson's law: data expands to fill space available. ! Text, images, sound, video, . All of the books in the world contain no more information than is Reference: Chapter 22, Algorithms in C, 2nd Edition, Robert Sedgewick. broadcast as video in a single large American city in a single year. Reference: Introduction to Data Compression, Guy Blelloch. Not all bits have equal value. -Carl Sagan Basic concepts ancient (1950s), best technology recently developed. Robert Sedgewick and Kevin Wayne • Copyright © 2005 • http://www.Princeton.EDU/~cos226 2 Applications of Data Compression Encoding and Decoding hopefully uses fewer bits Generic file compression. Message. Binary data M we want to compress. ! Files: GZIP, BZIP, BOA. Encode. Generate a "compressed" representation C(M). ! Archivers: PKZIP. Decode. Reconstruct original message or some approximation M'. ! File systems: NTFS. Multimedia. M Encoder C(M) Decoder M' ! Images: GIF, JPEG. ! Sound: MP3. ! Video: MPEG, DivX™, HDTV. Compression ratio. Bits in C(M) / bits in M. Communication. ! ITU-T T4 Group 3 Fax. Lossless. M = M', 50-75% or lower. ! V.42bis modem. Ex. Natural language, source code, executables. Databases. Google. Lossy. M ! M', 10% or lower. Ex. Images, sound, video. 3 4 Ancient Ideas Run-Length Encoding Ancient ideas. Natural encoding. (19 " 51) + 6 = 975 bits. ! Braille. needed to encode number of characters per line ! Morse code.
    [Show full text]
  • Discrete Cosine Transformation Based Image Data Compression Considering Image Restoration
    (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 6, 2020 Discrete Cosine Transformation based Image Data Compression Considering Image Restoration Kohei Arai Graduate School of Science and Engineering Saga University, Saga City Japan Abstract—Discrete Cosine Transformation (DCT) based restored image and the original image not on the space of the image data compression considering image restoration is original image but on the observed image. A general inverse proposed. An image data compression method based on the filter, a least-squares filter with constraints, and a projection compression (DCT) featuring an image restoration method is filter and a partial projection filter that may be significantly proposed. DCT image compression is widely used and has four affected by noise in the restored image have been proposed [2]. major image defects. In order to reduce the noise and distortions, However, the former is insufficient for optimization of the proposed method expresses a set of parameters for the evaluation criteria, etc., and is under study. assumed distortion model based on an image restoration method. The results from the experiment with Landsat TM (Thematic On the other hand, the latter is essentially a method for Mapper) data of Saga show a good image compression finding a non-linear solution, so it can take only a method performance of compression factor and image quality, namely, based on an iterative method, and various methods based on the proposed method achieved 25% of improvement of the iterative methods have been tried. There are various iterative compression factor compared to the existing method of DCT with methods, but there are a stationary iterative method typified by almost comparable image quality between both methods.
    [Show full text]
  • Image Compression Algorithms Using Dct
    Er. Abhishek Kaushik et al Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 4( Version 1), April 2014, pp.357-364 RESEARCH ARTICLE OPEN ACCESS Image Compression Algorithms Using Dct Er. Abhishek Kaushik*, Er. Deepti Nain** *(Department of Electronics and communication, Shri Krishan Institute of Engineering and Technology, Kurukshetra) ** (Department of Electronics and communication, Shri Krishan Institute of Engineering and Technology, Kurukshetra) ABSTRACT Image compression is the application of Data compression on digital images. The discrete cosine transform (DCT) is a technique for converting a signal into elementary frequency components. It is widely used in image compression. Here we develop some simple functions to compute the DCT and to compress images. An image compression algorithm was comprehended using Matlab code, and modified to perform better when implemented in hardware description language. The IMAP block and IMAQ block of MATLAB was used to analyse and study the results of Image Compression using DCT and varying co-efficients for compression were developed to show the resulting image and error image from the original images. Image Compression is studied using 2-D discrete Cosine Transform. The original image is transformed in 8-by-8 blocks and then inverse transformed in 8-by-8 blocks to create the reconstructed image. The inverse DCT would be performed using the subset of DCT coefficients. The error image (the difference between the original and reconstructed image) would be displayed. Error value for every image would be calculated over various values of DCT co-efficients as selected by the user and would be displayed in the end to detect the accuracy and compression in the resulting image and resulting performance parameter would be indicated in terms of MSE , i.e.
    [Show full text]