Lecture # 20 Image and Data Compression. Data Compression.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Digital Color 24-bit Color Indexed Color Image file compression
A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
Lecture #25 Digital Video Editing I. Digital Video.
SIMS-201 Compressing Information. 2  Overview Chapter 7: Compression Introduction Entropy Huffman coding Universal coding.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
School of Computing Science Simon Fraser University
Skills: none Concepts: the amount of information in an image This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Compression Word document: 1 page is about 2 to 4kB Raster Image of 1 page at 600 dpi is about 35MB Compression Ratio, CR =, where is the number of bits.
CSCI 3 Chapter 1.8 Data Compression. Chapter 1.8 Data Compression  For the purpose of storing or transferring data, it is often helpful to reduce the.
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
1 Data Compression Engineering Math Physics (EMP) Steve Lyon Electrical Engineering.
T.Sharon-A.Frank 1 Multimedia Size of Data Frame.
Computer Science 335 Data Compression.
Copyright 2003 Monash University IMS5401 Web-based Information Systems Topic 2: Elements of the Web (d) Digital representation.
Data Representation CS105. Data Representation Types of data: – Numbers – Text – Audio – Images & Graphics – Video.
Audio & Video Representation CS105. Data Representation Types of data: – Numbers – Text – Images – Audio & Video.
Last time 3 main components to a computer system Types of computers Talked about software – task oriented What are some kinds of data that a computer works.
Spring 2015 Mathematics in Management Science Binary Linear Codes Two Examples.
I Power Multimedia Technology Video Data. Video data Video is a sequence of individual pictures or frames, taken one after another. These are played back.
Management Information Systems Lection 06 Archiving information CLARK UNIVERSITY College of Professional and Continuing Education (COPACE)
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Data starts with width and height of image Then an array of pixel values (colors) The number of elements in this array is width times height Colors can.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Media File Formats Jon Ivins, DMU. Text Files n Two types n 1. Plain text (unformatted) u ASCII Character set is most common u 7 bits are used u This.
Lecture 10 Data Compression.
Chapter 2 Source Coding (part 2)
ECE242 L30: Compression ECE 242 Data Structures Lecture 30 Data Compression.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
Data Representation A series of eight bits is called a byte. A byte can be used to represent a number or a character. As you’ll see in the following table,
IT-101 Section 001 Lecture #7 Introduction to Information Technology.
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
Data Compression. Compression? Compression refers to the ways in which the amount of data needed to store an image or other file can be reduced. This.
Still-image compression Moving-image compression and File types.
CS 111 – Sept. 10 Quiz Data compression –text –images –sounds Commitment: –Please read rest of chapter 1. –Department picnic next Wednesday.
Agenda Last class: Memory, Digitizing Numbers Today: Digitizing: Text
Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.
Data Representation Robin Burke IT 130. Outline Data Representation Binary Numbers Image types.
CS 111 – Sept. 3 More data representation Review hex notation Text –ASCII and Unicode Sound and images Commitment: –For Wednesday: Please read pp
Compression  Data files compression  Music compression  Image and video compression.
Class 9 LBSC 690 Information Technology Multimedia.
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
Digital Video. Representing video An array of images Movie = video + audio.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
CS 101 – Sept. 11 Review linear vs. non-linear representations. Text representation Compression techniques Image representation –grayscale –File size issues.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
Online Documents – File Compression File size can be a big deal Like when you want more music on your phone Or work on your USB stick Or when you.
Or, how to make it all fit! DIGITAL VIDEO FILES AND COMPRESSION STANDARDS.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Data Storage and Compression.
Textbook does not really deal with compression.
4k… 4K format was named because it has 4000 pixels horizontal resolution approximately. Meanwhile, standard 1080p and 720p resolutions were named because.
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Graphics Bitmap Vector
Data Compression CS 147 Minh Nguyen.
Topic 3: Data Compression.
- orange white green - cyan - red - blue Example 1 24 bit RGB
COMS 161 Introduction to Computing
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 8 – Compression Aims: Outline the objectives of compression.
Quantizing Compression
- orange white green - cyan - red - blue Example 1 24 bit RGB
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Lecture # 20 Image and Data Compression

Data Compression

How big? Image 1024x1024x3 –3 Million bytes (3 MB) Audio x 10 min x 60 sec/min x 2 –58 million bytes (58 MB) Video –640 x 480 x 10 minutes –307,200 x 600 sec x 30 fps –16.6 billion pixels (17 GB) Compression (reduce the size)

Problem Reduce the size of a data object –Text –Image –Audio –Video How to do it –Cheat in ways that the user can ’ t see –Coherence

Ways to cheat Text generally only has less than 128 possible characters. –Use 7 bits instead of 8 (12%) For text, some characters are more common than others –Use fewer bits for common characters, more bits for infrequently used characters

Ways to cheat People can ’ t see more than 64 levels of gray –Use 6 bits instead of 8 (25%) People don ’ t see color as well as B/W –Use 6 bits for B/W and much less for color

Coherence If we know the previous value of something, then we generally have a good idea what the next value will be 3 Techniques –Run length encoding –Reuse of subsequences –Prediction and error

Run length encoding Values are frequently repeated. –Instead of storing each value, store a single value with a count of how many times to repeat

12 x 10 = 120 pixels 120 pixels x 3 bytes/pixel = 360 bytes

Run encoded RGB - 3 bytes Count - 1 byte Entries - 23 Space - 4*23 = 92 Compression (360-92)/360 = 74%

Run encoded - with indexed color 4 colors - 12 bytes index - 2 bits Count - 6 bits Entries - 23 Space *23 = 35 Compression (360-35)/360 = 90%

Run encoding HELLO Works well

Run encoding Works Badly

Run encoding Works well

Run encoding Not good Too much variation in the rose

Run encoding - text four score and seven years ago, our fathers brought forth on this continent Not good no repetition

Run Encoding - Audio Not good No repetition

Run Encoding - Audio Not good No repetition

Reuse common sequences

Works really well Used in GIF format

Reuse common sequences Works fair Blacks are good Rose has some similarities

Reuse common sequences

Works really well

Reuse common sequences Works poorly

Reuse common sequences Video Works really well Copy pieces from last frame into this frame One technique in MPEG

Reuse common sequences Text Reuses words and phrases Works fairly well Most common text compression technique

Prediction + error Given previous values, predict what the next value will be When it is not quite right, store the error The error almost always takes fewer bits than the value

Linear prediction line through previous predicts next Little error

Linear prediction line through previous predicts next More error

Linear prediction line through previous predicts next Still more error

Linear prediction line through previous predicts next less error

Linear prediction line through previous predicts next less error

Linear prediction line through previous predicts next little error

Linear Prediction

Look closer Little Error More error

Linear Prediction Prediction + error Shades of black Follows shade of rose Rose detail is error off shade Prediction + error + cheating = JPEG

JPEG Comparisons

Video Copy from previous frame Store error for small details MPEG

Text N-Grams Use the last N letters to predict the next letter Store errors English is quite regular

Review Cheat –Exploit weakness in what people can perceive Coherence –Run encoding (count repetitions) –Reuse (reference pieces from previous data) –Predict + error Know when each technique will or will not work