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

Similar documents
UNIT 7C Data Representation: Images and Sound

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

15110 Principles of Computing, Carnegie Mellon University

15110 Principles of Computing, Carnegie Mellon University

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

Chapter 8. Representing Multimedia Digitally

Fundamentals of Multimedia

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

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

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

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

Compression and Image Formats

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

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

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

PENGENALAN TEKNIK TELEKOMUNIKASI CLO

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

LECTURE 03 BITMAP IMAGE FORMATS

SOME PHYSICAL LAYER ISSUES. Lecture Notes 2A

Bitmap Image Formats

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

What You ll Learn Today

HTTP transaction with Graphics HTML file + two graphics files

Unit 4.4 Representing Images

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

Introduction to Photography

Lecture - 3. by Shahid Farid

Fundamentals of Digital Audio *

Computer Programming

Anti aliasing and Graphics Formats

Unit 1.1: Information representation

MULTIMEDIA SYSTEMS

Images with (a) coding redundancy; (b) spatial redundancy; (c) irrelevant information

Digital Images: A Technical Introduction

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:

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

Image Perception & 2D Images

Factors to Consider When Choosing a File Type

The BIOS in many personal computers stores the date and time in BCD. M-Mushtaq Hussain

Assistant Lecturer Sama S. Samaan

UNIVERSITY OF CALICUT INTRODUCTION TO MULTIMEDIA QUESTION BANK

Digital Imaging & Photoshop

Multimedia. Graphics and Image Data Representations (Part 2)

How is Information Stored

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

CS101 Lecture 19: Digital Images. John Magee 18 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

RGB COLORS. Connecting with Computer Science cs.ubc.ca/~hoos/cpsc101

Data Representation 1 am/pm Time allowed: 22 minutes

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

Graphics for Web. Desain Web Sistem Informasi PTIIK UB

Digital Audio. Lecture-6

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

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

Computers and Imaging

An Enhanced Approach in Run Length Encoding Scheme (EARLE)

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

TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES

GUIDELINES & INFORMATION

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

INTRODUCTION TO COMPUTER GRAPHICS

Module 4 Build a Game

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

The Strengths and Weaknesses of Different Image Compression Methods. Samuel Teare and Brady Jacobson

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

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

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

TODAY STANDARD COLORS RGB COLOR CS 115: COMPUTING FOR SOCIO-TECHNO WEB REPRESENTATION OF TEXT, NUMBERS AND CODE

ITP 140 Mobile App Technologies. Images

EE299 Midterm Winter 2007 Solutions

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

Raster Image File Formats

Lecture 17.5: More image processing: Segmentation

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

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

ITP 140 Mobile App Technologies. Colors Images Icons

Ch. 3: Image Compression Multimedia Systems

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

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

CS Lecture 10:

Picsel epage. Bitmap Image file format support

Developing Multimedia Assets using Fireworks and Flash

Multimedia-Systems: Image & Graphics

5.1 Image Files and Formats

IMAGE SIZING AND RESOLUTION. MyGraphicsLab: Adobe Photoshop CS6 ACA Certification Preparation for Visual Communication

Chapter 3 Digital Transmission Fundamentals

Digital Asset Management 2. Introduction to Digital Media Format

CMPSC 390 Visual Computing Spring 2014 Bob Roos Review Notes Introduction and PixelMath

LECTURE 02 IMAGE AND GRAPHICS

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

TELECOMMUNICATION SYSTEMS

APPLICATIONS OF DSP OBJECTIVES

Hybrid Coding (JPEG) Image Color Transform Preparation

Raster (Bitmap) Graphic File Formats & Standards

Bit Depth. Introduction

Chapter 3 Graphics and Image Data Representations

MOTION GRAPHICS BITE 3623

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

Information Hiding: Steganography & Steganalysis

Adobe Fireworks CS4 Kalamazoo Valley Community College February 25, 2010

The worlds we live in. The worlds we live in

Transcription:

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

Resolu1on The resolu1on 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 resolu1on, the more accurate the image will appear. 3 Vector vs. Bitmap There are two major ways to store images: Vector (a series of line segments) Bitmap (a series of pixels) 4 2

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. 5 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 6 3

256-color images (8-bit color) Each pixel is represented with a 8-bit value that is an index into a table of 256 colors. 7 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 representa1on allows for 2 24 = 16,777,216 different colors. This representa1on is also called true color. (image from Wikipedia) 8 4

RGB example RED GREEN BLUE dec: 51 236 130 bin: 00110011 11101100 10000010 hex: 3 3 E C 8 2 9 Comparing Representa1ons If an image has a resolu1on of 640 X 480 (307,200 pixels), how many bytes does each representa1on require? B&W 38,400 bytes 8-bit grayscale 307,200 bytes 256-color (8-bit color) 307,200 bytes True color (RGB) 921,600 bytes A single RGB screen image of size 1600 X 1200 requires over 5.76 million bytes! 10 5

GIF 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. Useful for represen1ng images with fewer colors or large areas of color like company logos. 11 GIF compression A lossless compression technique is used for GIF files called run-length encoding. Instead of storing the 8-bit value for every pixel, Color, Run, Color, Run,... we store an 8-bit value along with 255,1,0,3,255,1 how many of these 255,4,0,1 occur in a row (run). 255,1,0,4 This saves a lot when 0,1,255,3,0,1 there are large runs 0,1,255,3,0,1 of the same color. 255,1,0,4 (Colors: 0=Black, 255=White) 12 6

Comparison GIF BMP 2 bytes 16 bytes 2 bytes 16 bytes 10 bytes 16 bytes 10 bytes 16 bytes 2 bytes 16 bytes 2 bytes 16 bytes 64 bytes 192 bytes 13 JPEG (JPG) A lossy compression 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) 14 7

Sound When an instrument is played or a voice speaks, changes occur in air pressure which our ears interpret as sound. 15 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 1me intervals. The amplitude axis is divided into equally-spaced intervals depending on how many bits we want to store per sample. 16 8

Amplitude Sampling 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... 17 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. 18 9

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 ohen 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) 19 MP3 MP3 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 beker in mid range frequencies than on the low and high ends. If a loud and soh sound play at the same 1me, we can t hear the soh sound. MP3 filters the audio signal based on these proper1es. 20 10

MP3 Compression Like JPEG, MP3 has various levels of compression: Bit Rate Compression Ra1o Comments 256Kbps 5:1 Supreme (near best) 192Kbps 7:1 Excellent (beker) 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. 21 11