Topic 3: Data Compression.

Slides:



Advertisements
Similar presentations
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Advertisements

Data Compression CS 147 Minh Nguyen.
Web Design Vocab 3 PNG, JPG, GIF, MP3, MPEG.
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Lecture # 20 Image and Data Compression. Data Compression.
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
ICT Foundation 1 Copyright © 2010, IT Gatekeeper Project – Ohiwa Lab. All rights reserved. Data Compression.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
 Wisegeek.com defines Data Compression as:  “Data compression is a general term for a group of technologies that encode large files in order to shrink.
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.
Nat 4/5 - Software Design and Development – Low Level Operations - 1 National 4/5 – Computing Science Information Systems Design and Development Media.
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 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Common file formats  Lesson Objective: Understanding common file formats and their differences.  Learning Outcome:  Describe the type of files which.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
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.
An introduction to audio/video compression Dr. Malcolm Wilson.
File Formats Different applications (programs) store data in different formats. Applications support some file formats and not others. Open…, Save…, Save.
Unit 1: Task 1 By Abbie Llewellyn. Vector Graphic Software (Corel Draw) Computer graphics can be classified into two different categories: raster graphics.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Class 9 LBSC 690 Information Technology Multimedia.
Digital Images are represented by manipulating this…
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
Chapter 3 Data Representation. 2 Compressing Files.
Comp 335 File Structures Data Compression. Why Study Data Compression? Conserves storage space Files can be transmitted faster because there are less.
Digital File Formats By Ali Aslam. JPEG JPEG Stands for Joint Photographic Experts Group. JPEG uses a lossy compression routine. Lossy compression means.
Digital Graphics for Computer Games Pixels Types of Digital Graphics (Raster and Vector) Compression.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
Information Systems Design and Development Media Types Computing Science.
An introduction to audio/video compression Prepared by :: Bhatt shivani ( )
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
FILE COMPRESSION Lossy vs Lossless. Why compress a file? To save storage space. To speed up data transmission.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Data Compression Michael J. Watts
8th Lecture – Intro to Bitmap or Raster Images
Lesson Objectives Aims You should be able to:
How Has This Course Changed Your Perception of Digital Media
File Formats Different applications (programs) store data in different formats. Applications support some file formats and not others. Open…, Save…, Save.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Data Storage and Compression.
File Compression 3.3.
Web Graphics By Chris Harding.
Compression & Huffman Codes
Vocabulary byte - The technical term for 8 bits of data.
Video Basics.
Data Compression.
Lesson Objectives Aims You should know about: 1.3.1:
Graphics Bitmap Vector
File Compression 3.3.
JPG vs GIF vs PNG What is the difference?
Data Compression.
File Compression-overview
Vocabulary byte - The technical term for 8 bits of data.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
File size and image quality
Representing Images 2.6 – Data Representation.
Web Design and Development
Working with images EIT, Author Gay Robertson, 2018.
GRAPHICAL DATA EXCHANGE FORMATS .jpg .gif .tif.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Do Now! Convert the following sequence of bits into an image using the protocol we discussed (first 8 bits are lengthxwidth, Then fill in the rows pixel.
File Compression and Formats
Data Compression.
Chapter 8 – Compression Aims: Outline the objectives of compression.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.9 Data Compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Topic 3: Data Compression

Example: Full HD Image (1920x1080), with a 32-bit colour depth Compression Saving high-quality data in their raw format can be quite memory costly Saving an image with lots of pixels/high colour depth Saving an audio file with a high bitrate So, we need to work out a way of reducing memory size, but keeping most of the data’s quality Example: Full HD Image (1920x1080), with a 32-bit colour depth Memory Size: 8.294MB

Compression This is where compression comes in Compression tries to reduce memory size while keeping data quality There are lots of compression techniques, but they fall into two categories Lossy: some quality is lost Lossless: no quality is lost

Compression Lossless Compression Maintains data quality in its entirety So no data is lost at all Can still reduce overall memory size Though doesn’t have the biggest impact

Compression Lossless Compression Best used on data that we want to maintain entirely Especially if the data is used on a computer Computers can use pictures to train themselves to detect objects and people! For something like this, lossless compression would work best (as the computer will need all the original data).

Compression Lossless Compression There are a few lossless compression techniques Run-Length Encoding: Used in PDFs Huffman Coding: Used for lots of things (including PNGs) Lempel-Ziv-Welch: Used for GIFs You only need to know Run-Length Encoding, not the others

Compression Lossy Compression Will reduce or destroy data quality Meaning data can be lost Reduces overall memory size quite a lot Far better at it than lossless compression

Compression Lossy Compression Best used for any user-consumed data Images people will look at Audio that people will listen to Humans don’t tend to pick up on fine detail loss that lossy compression can result in It’s often preferred to use lossy compression on images, audio, and video as humans won’t see the loss in detail, and the gain in decreased memory size is very worth it

Compression Lossy Compression There are a few lossy compression techniques as well MP3: Used in MP3 files (audio) JPEG: Used in JPG files (images) MPEG-4: Used in MP4 files (video) Lossy compression techniques tend to be tied to file formats

Storing an image with the following colours: Run-Length Encoding There are different versions of Run-Length Encoding Simplest method does the following Storing an image with the following colours: rrrrbbgg bbbggggg rrrrrrrr We can compress that to: (4, r) (2, b) (2, g) (3, b) (5, g) (8, r)

Storing an image with the following colours: Run-Length Encoding For every series of repeating values, we Write the number of repeats first Then write the value that is being repeated Storing an image with the following colours: rrrrbbgg bbbggggg rrrrrrrr We can compress that to: (4, r) (2, b) (2, g) (3, b) (5, g) (8, r)

Storing an image with the following colours: Run-Length Encoding If a colour takes 3 bytes, we can compress: 10 repeating colours (30 bytes) Into 1 number (1 byte) and 1 colour (3 bytes) Storing an image with the following colours: rrrrbbgg bbbggggg rrrrrrrr We can compress that to: (4, r) (2, b) (2, g) (3, b) (5, g) (8, r)

Perform the Run-Length Compression technique on the following strings aaaaaaaaaabbbbbbbbbbccccccbbbbb bbbbbbbbbbbccccccaaaacccaaacccccc bbbcccccbbbbaaaaaaccccbbbbaaacccc https://funtechacademies.co.uk/Academies/Timer/timer.html ANSWERS From top-left to bottom-right: (10, a) (10, b) (6, c) (5, b) (11, b) (6, c) (4, a) (3, c) (3, a) (6, c) (3, b) (5, c) (4, b) (6, a) (4, c) (4, b) (3, a) (4, c)