Advanced Data Structures and Algorithms

Similar documents
Data Storage and Manipulation

Data Manipulation. Audio and Image Representation. -Representation, Compression, and Communication Errors. Audio Representation

Example: compressing black and white images 2 Say we are trying to compress an image of black and white pixels: CSC310 Information Theory.

8/30/2010. Chapter 1: Data Storage. Bits and Bit Patterns. Boolean Operations. Gates. The Boolean operations AND, OR, and XOR (exclusive or)

Chapt er 3 Data Representation

Lossless Compression With Context And Average Encoding And Decoding And Error Modelling In Video Coding

An Introduction to Image Compression

Lossless Compression Algorithms for Direct- Write Lithography Systems

Video coding standards

EMBEDDED ZEROTREE WAVELET CODING WITH JOINT HUFFMAN AND ARITHMETIC CODING

Color Image Compression Using Colorization Based On Coding Technique

Comparison of Dictionary-Based Approaches to Automatic Repeating Melody Extraction

ELEC 691X/498X Broadcast Signal Transmission Fall 2015

Implementation of an MPEG Codec on the Tilera TM 64 Processor

A Combined Compatible Block Coding and Run Length Coding Techniques for Test Data Compression

Digital Representation

Autosophy data / image compression and encryption

Multimedia Communications. Image and Video compression

Multimedia Communications. Video compression

Data Representation. signals can vary continuously across an infinite range of values e.g., frequencies on an old-fashioned radio with a dial

N-Pattern Huffman Compression Algorithm for Medical Images in Telemedicine

Audio Compression Technology for Voice Transmission

CM3106 Solutions. Do not turn this page over until instructed to do so by the Senior Invigilator.

WYNER-ZIV VIDEO CODING WITH LOW ENCODER COMPLEXITY

BITSTREAM COMPRESSION TECHNIQUES FOR VIRTEX 4 FPGAS

COMP 249 Advanced Distributed Systems Multimedia Networking. Video Compression Standards

COMPRESSION OF DICOM IMAGES BASED ON WAVELETS AND SPIHT FOR TELEMEDICINE APPLICATIONS

(12) Patent Application Publication (10) Pub. No.: US 2005/ A1. RF Component. OCeSSO. Software Application. Images from Camera.

4 Anatomy of a digital camcorder

Layout Decompression Chip for Maskless Lithography

How Does H.264 Work? SALIENT SYSTEMS WHITE PAPER. Understanding video compression with a focus on H.264

IMAGE AND TEXT COMPRESSION

MPEG + Compression of Moving Pictures for Digital Cinema Using the MPEG-2 Toolkit. A Digital Cinema Accelerator

AT65 MULTIMEDIA SYSTEMS DEC 2015

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Lecture 1: Introduction & Image and Video Coding Techniques (I)

DWT Based-Video Compression Using (4SS) Matching Algorithm

Chapter 10 Basic Video Compression Techniques

A New Compression Scheme for Color-Quantized Images

Lab 2 Part 1 assigned for lab sessions this week

A Big Umbrella. Content Creation: produce the media, compress it to a format that is portable/ deliverable

Data Encoding CTPS 2018

INTERNATIONAL TELECOMMUNICATION UNION GENERAL ASPECTS OF DIGITAL TRANSMISSION SYSTEMS PULSE CODE MODULATION (PCM) OF VOICE FREQUENCIES

Chapter 1: Data Storage. Copyright 2015 Pearson Education, Inc.

Digital Video Telemetry System

Understanding Compression Technologies for HD and Megapixel Surveillance

Understanding IP Video for

VITERBI DECODER FOR NASA S SPACE SHUTTLE S TELEMETRY DATA

CERIAS Tech Report Preprocessing and Postprocessing Techniques for Encoding Predictive Error Frames in Rate Scalable Video Codecs by E

Hardware Implementation of Viterbi Decoder for Wireless Applications

INTRA-FRAME WAVELET VIDEO CODING

Distributed Video Coding Using LDPC Codes for Wireless Video

MULTIMEDIA COMPRESSION AND COMMUNICATION

Transcript of Episode #205. Lempel & Ziv

Link download full: Test Bank for Business Data Communications Infrastructure Networking and Security 7th Edition by William

Video compression principles. Color Space Conversion. Sub-sampling of Chrominance Information. Video: moving pictures and the terms frame and

Joint Optimization of Source-Channel Video Coding Using the H.264/AVC encoder and FEC Codes. Digital Signal and Image Processing Lab

Audio and Video II. Video signal +Color systems Motion estimation Video compression standards +H.261 +MPEG-1, MPEG-2, MPEG-4, MPEG- 7, and MPEG-21

Error Resilience for Compressed Sensing with Multiple-Channel Transmission

OBJECT-BASED IMAGE COMPRESSION WITH SIMULTANEOUS SPATIAL AND SNR SCALABILITY SUPPORT FOR MULTICASTING OVER HETEROGENEOUS NETWORKS

MPEG has been established as an international standard

Part 1: Introduction to computer graphics 1. Describe Each of the following: a. Computer Graphics. b. Computer Graphics API. c. CG s can be used in

ECG SIGNAL COMPRESSION BASED ON FRACTALS AND RLE

Information Transmission Chapter 3, image and video

5) The transmission will be able to be done in colors, grey scale or black and white ("HF fax" type).

FAX Image Compression

DATA COMPRESSION USING THE FFT

Part 1: Introduction to Computer Graphics

Understanding IP Video for

1/29/2008. Announcements. Announcements. Announcements. Announcements. Announcements. Announcements. Project Turn-In Process. Quiz 2.

Announcements. Project Turn-In Process. Project 1A: Project 1B. and URL for project on a Word doc Upload to Catalyst Collect It

A Digital Video Primer

Data Mining. Dr. Raed Ibraheem Hamed. University of Human Development, College of Science and Technology Department of CS

(12) Patent Application Publication (10) Pub. No.: US 2004/ A1

yintroduction to video compression ytypes of frames ysome video compression standards yinvolves sending:

Announcements. Project Turn-In Process. and URL for project on a Word doc Upload to Catalyst Collect It

MULTI WAVELETS WITH INTEGER MULTI WAVELETS TRANSFORM ALGORITHM FOR IMAGE COMPRESSION. Pondicherry Engineering College, Puducherry.

Logic Design II (17.342) Spring Lecture Outline

H.261: A Standard for VideoConferencing Applications. Nimrod Peleg Update: Nov. 2003

The ISBN number is a 10-digit number consisting of 4 groups, each separated by a hyphen:

Digital Media. Daniel Fuller ITEC 2110

Implementation and performance analysis of convolution error correcting codes with code rate=1/2.

DELTA MODULATION AND DPCM CODING OF COLOR SIGNALS

Principles of Video Compression

Motion Video Compression

SUMMIT LAW GROUP PLLC 315 FIFTH AVENUE SOUTH, SUITE 1000 SEATTLE, WASHINGTON Telephone: (206) Fax: (206)

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Enhanced Frame Buffer Management for HEVC Encoders and Decoders

New Technologies for Premium Events Contribution over High-capacity IP Networks. By Gunnar Nessa, Appear TV December 13, 2017

A Modified Compression Algorithm for Nucleotide Data Based on Differential Direct Coding and Variable Length

VIDEO GRABBER. DisplayPort. User Manual

Network. Decoder. Display

More design examples, state assignment and reduction. Page 1

Introduction to image compression

A Layered Approach for Watermarking In Images Based On Huffman Coding

A Novel Study on Data Rate by the Video Transmission for Teleoperated Road Vehicles

J. ISSN: The ISSN/EAN-13 barcode has the following components:

The Essence of Image and Video Compression 1E8: Introduction to Engineering Introduction to Image and Video Processing

CS311: Data Communication. Transmission of Digital Signal - I

Rate-Adaptive Codes for Distributed Source Coding

Transcription:

Data Compression Advanced Data Structures and Algorithms Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 1

Introduction What is Compression? Compression is the process of encoding data more efficiently to achieve a reduction in file size Advantages of Compression 1) When compressed, the quantity of bits used to store the information is reduced. 2) Files that are smaller in size will result in shorter transmission times when they are transferred on the Internet. 3) Compressed files also take up less storage space. 4) File compression can zip up several small files into a single file for more convenient email transmission. 2

OBJECTIVES After reading this topic, the reader should be able to: Realize the need for data compression. Differentiate between lossless and lossy compression. Understand three lossless compression encoding techniques: run-length, Huffman, and Lempel Ziv. Understand two lossy compression methods: JPEG and MPEG. DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 3

Data compression methods Data compression means sending or storing a smaller number of bits. Figure 15-1 Brooks/Cole, 2003 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 4

Lossless Compression Methods DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 5

Lossless compression In lossless data compression, the integrity of the data is preserved. The original data and the data after compression and decompression are exactly the same because the compression and decompression algorithms are exactly the inverse of each other. Example: Run-length encoding Huffman encoding Lempel Ziv (L Z) encoding (dictionary-based encoding) Brooks/Cole, 2003 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 6

Run-length encoding It does not need knowledge of the frequency of occurrence of symbols and can be very efficient if data are represented as 0s and 1s. For example: Brooks/Cole, 2003 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 6 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 7

Run-length encoding for two symbols We can encode one symbol which is more frequent than the other. This example only encode 0 s between 1 s. 14 4 0 12 There is no 0 between 1 s Brooks/Cole, 2003 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 7 DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 8

Binary Run-length encoding Code the run length of 0 s using k bits. Transmit the code. Do not transmit runs of 1 s. Two consecutive 1 s are implicitly separately by a zero-length run of zero. Example: suppose we use k = 4 bits to encode the run length (maximum run length of 15) for following bit patterns. Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 9 7

Example: run-length encoding for a data sequence having frequent runs of zeros Data files frequently contain the same character repeated many times in a row. For example, text files use multiple spaces to separate sentences, indent paragraphs, format tables & charts, etc. Note: many single zeros in the data can make the encoded file larger than the original. Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 10 10 8

Huffman coding The following algorithm generates Huffman code: Find (or assume) the probability of each values occurrence. Initialization: Put all nodes in an list, keep it sorted at all times (e.g., ABCDE). Take the two symbols with the lowest probability, and place them as leaves on a binary tree. Form a new row in the table replacing the these two symbols with a new symbol. This new symbol forms a branch node in the tree. Draw it in the tree with branches to its leaf (component) symbols Assign the new symbol a probability equal to the sum of the component symbol s probability. Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 11 11

Huffman coding Repeat the above until there is only one symbol left. This is the root of the tree. Nominally assign 1 s to the right hand branches and 0 s to the left hand branches at each node. Read the code for each symbol from the root of the tree. David Huffman Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 12 11

Huffman coding o In Huffman coding, you assign shorter codes to symbols that occur more frequently and longer codes to those that occur less frequently. o The process of building the tree begins by counting the occurrences of each symbol in the text to be encoded. o For example: Character A B C D E ------------------------------------------------------ Frequency 17 12 12 27 32 Table 15.1 Frequency of characters Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 13 9

Figure 15-4 Huffman coding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 14

Figure 15-5 Final tree and code DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 15

Figure 15-6 Huffman encoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 16

Figure 15-7 Huffman decoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 17

Huffman coding The beauty of Huffman coding is that no code in the prefix of another code. There is no ambiguity in encoding. The receiver can decode the received data without ambiguity. Huffman code is called instantaneous (immediate) code because the decoder can unambiguously decode the bits instantaneously with the minimum number of bits. Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 18 15

Lempel Ziv encoding LZ encoding is an example of a category of algorithms called dictionary-based encoding. The idea is to create a dictionary (table) of strings used during the communication session. The compression algorithm extracts the smallest substring that cannot be found in the dictionary from the remaining non-compressed string. Abraham Lempel Jacob Ziv Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 19 16

Figure 15-8:Part I Example of Lempel Ziv encoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 20

Figure 15-8:Part 2 Example of Lempel Ziv encoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 21

Figure 15-9: Part I Example of Lempel Ziv decoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 22

Figure 15-9: Part II Example of Lempel Ziv decoding DEPARTMENT OF COMPUTER SCIENCE- ADSA - UHD 23

Brooks/Cole, 2003 DEPARTMENT DEPARTMENT OF COMPUTER OF COMPUTER SCIENCE- SCIENCE- ADSA ADSA - UHD - UHD 24 24 22