UNIT 7C Data Representation: Images and Sound Principles of Computing, Carnegie Mellon University CORTINA/GUNA

Similar documents
UNIT 7C Data Representation: Images and Sound

UNIT 7B Data Representa1on: Images and Sound. Pixels. An image is stored in a computer as a sequence of pixels, picture elements.

15110 Principles of Computing, Carnegie Mellon University

15110 Principles of Computing, Carnegie Mellon University

The Need for Data Compression. Data Compression (for Images) -Compressing Graphical Data. Lossy vs Lossless compression

Fundamentals of Multimedia

Byte = More common: 8 bits = 1 byte Abbreviation:

Lecture - 3. by Shahid Farid

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

INTRODUCTION TO COMPUTER GRAPHICS

CGT 511. Image. Image. Digital Image. 2D intensity light function z=f(x,y) defined over a square 0 x,y 1. the value of z can be:

Bitmap Image Formats

Multimedia. Graphics and Image Data Representations (Part 2)

Digital Asset Management 2. Introduction to Digital Media Format

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Topics. 1. Raster vs vector graphics. 2. File formats. 3. Purpose of use. 4. Decreasing file size

HTTP transaction with Graphics HTML file + two graphics files

Dr. Shahanawaj Ahamad. Dr. S.Ahamad, SWE-423, Unit-06

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

LECTURE 03 BITMAP IMAGE FORMATS

Bitmap Vs Vector Graphics Web-safe Colours Image compression Web graphics formats Anti-aliasing Dithering & Banding Image issues for the Web

Multimedia-Systems: Image & Graphics

Chapter 8. Representing Multimedia Digitally

Anti aliasing and Graphics Formats

CGT 211 Sampling and File Formats

Starting a Digitization Project: Basic Requirements

Raster Image File Formats

Adding some light to computing. Lawrence Snyder University of Washington, Seattle

Common File Formats. Need to store an image on disk Real photos Synthetic renderings Composed images. Desirable Features High quality.

LECTURE 02 IMAGE AND GRAPHICS

Unit 1.1: Information representation

Assistant Lecturer Sama S. Samaan

4 Images and Graphics

An Enhanced Approach in Run Length Encoding Scheme (EARLE)

The next table shows the suitability of each format to particular applications.

Ch. 3: Image Compression Multimedia Systems

Digitizing Color. Place Value in a Decimal Number. Place Value in a Binary Number. Chapter 11: Light, Sound, Magic: Representing Multimedia Digitally

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Factors to Consider When Choosing a File Type

5/17/2009. Digitizing Color. Place Value in a Binary Number. Place Value in a Decimal Number. Place Value in a Binary Number

Q A bitmap file contains the binary on the left below. 1 is white and 0 is black. Colour in each of the squares. What is the letter that is reve

PENGENALAN TEKNIK TELEKOMUNIKASI CLO

CS101 Lecture 18: Audio Encoding. What You ll Learn Today

Unit 4.4 Representing Images

Information representation

STANDARD ST.67 MAY 2012 CHANGES

B.Digital graphics. Color Models. Image Data. RGB (the additive color model) CYMK (the subtractive color model)

Fundamentals of Digital Audio *

Image Perception & 2D Images

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

MULTIMEDIA SYSTEMS

Digital Images. Digital Images. Digital Images fall into two main categories

CS101 Lecture 12: Digital Images. What You ll Learn Today

3.1 Graphics/Image age Data Types. 3.2 Popular File Formats

Compression and Image Formats

Specific structure or arrangement of data code stored as a computer file.

An Analytical Study on Comparison of Different Image Compression Formats

ITP 140 Mobile App Technologies. Images

Digital Images: A Technical Introduction

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

GUIDELINES & INFORMATION

Module 4 Build a Game

V Grech. Publishing on the WWW. Part 1 - Static graphics. Images Paediatr Cardiol Oct-Dec; 2(4):

What You ll Learn Today

COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. Digital Images Vector Graphics

raw format format for capturing maximum continuous-tone color information. It preserves all information when photograph was taken.

Picsel epage. Bitmap Image file format support

Multimedia Systems Entropy Coding Mahdi Amiri February 2011 Sharif University of Technology

Chapter 3 Graphics and Image Data Representations

PCCLUB.ORG.UK Tuesday, 3 rd May 2005 Stuart Crump. Picture Editing, Printing & Publishing Tutorial 1 of 2

Data Representation. "There are 10 kinds of people in the world, those who understand binary numbers, and those who don't."

ITP 140 Mobile App Technologies. Colors Images Icons

Indexed Color. A browser may support only a certain number of specific colors, creating a palette from which to choose

Unit 1 Digital Content

SOME PHYSICAL LAYER ISSUES. Lecture Notes 2A

A Hybrid Technique for Image Compression

Computers and Imaging

Introduction to Photography

Glossary Unit 1: Hardware/Software & Storage Media

Learning Outcomes. Black and White pictures. Bitmap Graphics. COMPSCI 111/111G Digital Images and Vector Graphics

1 Li & Drew c Prentice Hall Li & Drew c Prentice Hall 2003

CSC 170 Introduction to Computers and Their Applications. Lecture #3 Digital Graphics and Video Basics. Bitmap Basics

*Which code? Images, Sound, Video. Computer Graphics Vocabulary

HIGHLY EFFICIENT IMAGE FILE FORMAT: A REVIEW

Digital Media. Lecture 4: Bitmapped images: Compression & Convolution Georgia Gwinnett College School of Science and Technology Dr.

3. Image Formats. Figure1:Example of bitmap and Vector representation images

EEB5894. Multimedia 4/6/11

Understanding Image Formats And When to Use Them

Color, graphics and hardware Monitors and Display

Photoshop 01. Introduction to Computer Graphics UIC / AA/ AD / AD 205 / F05/ Sauter.../documents/photoshop_01.pdf

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

Color & Compression. Robin Strand Centre for Image analysis Swedish University of Agricultural Sciences Uppsala University

Scientific Working Group on Digital Evidence

1. Describe how a graphic would be stored in memory using a bit-mapped graphics package.

Digital Imaging & Photoshop

CHAPTER 3: Data Formats

Astronomy and Image Processing. Many thanks to Professor Kate Whitaker in the physics department for her help

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Chapter 3. ZHU Yongxin, Winson

Adobe Fireworks CS4 Kalamazoo Valley Community College February 25, 2010

Graphics for Web. Desain Web Sistem Informasi PTIIK UB

Transcription:

UNIT 7C Data Representation: Images and Sound Carnegie Mellon University CORTINA/GUNA 1

Announcements Pa6 is available now 2

Pixels An image is stored in a computer as a sequence of pixels, picture elements. 3

Resolution The resolution of an image is the number of pixels used to represent the image (e.g. 1024 X 768). Each pixel represents the average color in that region. The higher the resolution, the more accurate the image will appear. 4

Bitmap file format 5

bitmap Header = 54 bytes Header[18-21] = width Header[22-25] = length Header[2-5] Carnegie Mellon University - GUNA 6

Class work Please read the rest of the slides We will cover them in class monday 7

Vector vs. Bitmap There are two major ways to store images: Vector graphics: a series of lines or curves. Expensive to compute but smoothly rescales. Bitmap graphics: an array of pixels. Cheap to compute, but scales poorly. 8

Storing Bitmap Images In bitmapped images, each pixel is represented in computer memory in binary, just like other data types. If pixels of an image are black or white only, then we only need 1 bit per pixel to store the image. 9

Grayscale Images Grayscale images contain pixels that are various shades of gray, from black (maximum gray) to white (minimum gray). If there are 256 levels of gray for pixels, we can represent each pixel using 8 bits. 11111111 = white : (shades of gray) 00000000 = black 10

256-color images (8-bit color) Each pixel is represented with a 8-bit value that is an index into a paletteof 256 colors. 11

RGB-color images (24-bit color) Colors are represented as mixtures of red (R), green (G), and blue (B). Each pixel is represented using three 8-bit values, one for each color component. This representation allows for 2 24 = 16,777,216 different colors. This representation is also called true color. (image from Wikipedia) 12

RGB example RED GREEN BLUE dec: 51 236 130 bin: 00110011 11101100 10000010 hex: 3 3 E C 8 2 13

Comparing Representations If an image has a resolution of 640 X 480 (307,200 pixels), how many bytes does each representation require? B&W 38,400 bytes 8-bit grayscale 307,200 bytes 256-color (8-bit color) 307,200 bytes A single RGB screen image of size 1600 X 1200 requires over 5.76 million bytes! 14

RLE compression Run-Length Encoding is a losslesscompression technique used in early image files. Instead of storing the 8-bit value for every pixel, we store an 8-bit value along with how many of these occur in a row (run). This saves a lot when there are large runs of the same color. Color, Run, Color, Run,... 255,1,0,3,255,1 255,4,0,1 255,1,0,4 0,1,255,3,0,1 0,1,255,3,0,1 255,1,0,4 (Colors: 0=Black, 255=White) 15

Comparison RLE Bitmap 2 bytes 16 bytes 2 bytes 16 bytes 6 bytes 16 bytes 6 bytes 16 bytes 6 bytes 16 bytes 10 bytes 16 bytes 10 bytes 16 bytes 6 bytes 16 bytes 6 bytes 16 bytes 6 bytes 16 bytes 2 bytes 16 bytes 2 bytes 16 bytes 64 bytes 192 bytes 16

GIF: Graphic Interchange Format Developed by CompuServe in the late 1980s to represent 8-bit images efficiently. Each pixel is an 8-bit value, mapping to a table of 256 24-bit RGB colors. A codebook stores recurring sequences. Useful for representing images with fewer colors or large areas of color like company logos. 17

GIF Patent Issues GIF uses the LZW (Lempel-Ziv-Welch) compression algorithm, which produces variable-length codes for common sequences of pixels. The LZW algorithm was patented by Sperry Corp., later Unisys Corp. Compuserve didn t know this when they created GIF. Later, Unisys tried to charge license fees for use of the LZW algorithm in software products. Some outraged users launched a GIF boycott. The patent expired in 2003. 18

JPEG (JPG): Joint Photographic Experts Group A lossycompression technique used generally for photographic images. Uses a variant of Huffman encoding. Supports varying levels of compression. Higher quality Medium quality Lowest quality Compression 2.6:1 Compression 23:1 Compression 144:1 (images from Wikipedia) 19

Sound When an instrument is played or a voice speaks, changes occur in air pressure which our ears interpret as sound. 20

Sampling A sound is represented digitally by sampling an electronic version of the audio signal. The amplitude of the signal is measured (sampled) at equally-spaced time intervals. The amplitude axis is divided into equally-spaced intervals depending on how many bits we want to store per sample. 21

Sampling Amplitude 0111 0110 0101 0100 0011 0010 0001 0000 1111 1110 1101 1100 1011 1010 1001 1000 Time 1110 0010 0101 0110 0011 0000 1100 1010 1001 1010 1101 1111 0010... 22

Sampling In order to reproduce the audio waveform as accurately as possible, we need to increase the sampling rate (samples per second) and the number of amplitude levels (bits per sample). Note in the previous picture how some of the samples had to be moved up or down to match an amplitude level and some finer changes in the sound signal could be missed if the sampling rate is too low. 23

Sampling Digital recordings are typically sampled at 44,100 samples per second (Hertz Hz). This is due to the sampling theorem that states that the sampling rate must be at least twice the highest frequency in the sound, and humans can hear up to approx. 20,000 Hz. For accurate amplitude readings, sound is often sampled at 16-bits per sample (so there are 65,536 amplitude levels that can be measured). Some systems sample at finer amplitude levels (e.g. 24 bits per sample) 24

MP3 MP3 (MPEG3) is a lossy compression technique. This format takes advantage of some facts about human hearing. We can t hear certain sounds (very low or very high frequencies). Our hearing is better in mid range frequencies than on the low and high ends. If a loud and soft sound play at the same time, we can t hear the soft sound. MP3 filters the audio signal based on these properties. 25

MP3 Compression Like JPEG, MP3 has various levels of compression: Bit Rate Compression Ratio Comments 256Kbps 5:1 Supreme (near best) 192Kbps 7:1 Excellent (better) 128Kbps 11:1 CD quality (good) 96Kbps 19:1 Near CD quality (fair) 64Kbps 22:1 FM quality (poor) MP3 also has Variable Bit Rate (VBR) since compression ability can vary at different segments of the digital recording. 26

MP4 MPEG = Moving Picture Experts Group MP4 (MPEG4) is a compression technique developed for video. Since most of the time there are only small changes from one frame of a video to the next frame, large savings are possible. DVD movies and smart phones use the MP4 encoding. 27

YouTube, Vimeo, etc. Video hosting sites such as YouTube and Vimeo support a variety of formats, including MP4, AVI (Microsoft), QuickTime (Apple), and Flash (Adobe). You can download videos from these sites in your preferred format using tools such as KeepVid (visit www.keepvid.com). Uploading and then downloading a video may reduce the quality due to lossy compression. 28