Representing Images. Goals for Image Representation digitization & resolution digitization & resolution representing color representing color color depth.

Slides:



Advertisements
Similar presentations
Multimedia: Digitised Sound Data Section 3. Sound in Multimedia Types: Voice Overs Special Effects Musical Backdrops Sound can make multimedia presentations.
Advertisements

Digital Color 24-bit Color Indexed Color Image file compression
Madeleine Wright Peter Wentworth. » On your screen, or with light beams, colours are additive. » Each pixel is a mixture of Red, Green and Blue, the additive.
Eee116j1 1 Digital Information Engineering Science EEE116J1 Prof Paul Maguire w.
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different.
Dale & Lewis Chapter 3 Data Representation. Representing color Similarly to how color is perceived in the human eye, color information is encoded in combinations.
CSC Computing with Images1 Image encodings CSC 1040.
Audio & Video Representation CS105. Data Representation Types of data: – Numbers – Text – Images – Audio & Video.
1 Basics of Digital Imaging Digital Image Capture and Display Kevin L. Lorick, Ph.D. FDA, CDRH, OIVD, DIHD.
Image Formation and Digital Video
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
CS 1308 Computer Literacy and the Internet. Creating Digital Pictures  A traditional photograph is an analog representation of an image.  Digitizing.
CPS120 Introduction to Computer Science Lecture 4
Department of Physics and Astronomy DIGITAL IMAGE PROCESSING
Fundamentals of Photoshop
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
CSCI-235 Micro-Computers in Science Hardware Part II.
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.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
 Refers to sampling the gray/color level in the picture at MXN (M number of rows and N number of columns )array of points.  Once points are sampled,
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Digital Cameras And Digital Information. How a Camera works Light passes through the lens Shutter opens for an instant Film is exposed to light Film is.
Still-image compression Moving-image compression and File types.
Communicating Quantitative Information Is a picture worth 1000 words? Digital images. Number bases Standards, Compression Will [your] images last? Homework:
Agenda Last class: Memory, Digitizing Numbers Today: Digitizing: Text
Image formats. Basic terminologies… Pixels: Pixels are the building blocks of every digital image. a pixel is a single point in a graphic image. Resolutions:
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
2D Graphics Theory & Principles. Single Point Smallest addressable area on screen or digital image.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION.
Media Types Information Systems can contain the following types of media: Sound, graphics, video & text.
Digital Video Digital video is basically a sequence of digital images  Processing of digital video has much in common with digital image processing First.
CSCI-100 Introduction to Computing Hardware Part II.
The Digital Revolution Changing information. What is Digital?  Discrete values used for  Input  Processing  Transmission  Storage  Display  Derived.
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 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
CS 101 – Sept. 14 Review Huffman code Image representation –B/W and color schemes –File size issues.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Image Editing Vocabulary Words Pioneer Library System Norman Public Library Nancy Rimassa, Trainer Thanks to Wikipedia ( help.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
DIGITAL MEDIA FOUNDATIONS
Images Data Representation.
Data Representation Images.
Image Processing Objectives To understand pixel based image processing
Data Representation.
Binary Notation and Intro to Computer Graphics
Level 3 Extended Diploma Unit 19 Computer Systems Architecture
Binary Representation in Audio and Images
Computer Science Higher
How to Convert Pictures into Numbers
Multimedia: Digitised Sound Data
Digital 2D Image Basic Masaki Hayashi
Representing Images 2.6 – Data Representation.
Summer Term Year 10 Slides
Chapter 2 Data Representation.
Web Programming– UFCFB Lecture 7
Computer Systems Nat 4.5 Computing Science Data Representation
Basic Concepts of Digital Imaging
Presentation transcript:

Representing Images

Goals for Image Representation digitization & resolution digitization & resolution representing color representing color color depth (bits per pixel) color depth (bits per pixel) image compression (lossy vs lossless) image compression (lossy vs lossless)

Picture is represented by “dots”, or pixels (picture elements). Other examples: newsprint newsprint television television computer monitor. computer monitor. More dots = higher quality = higher quality = higher resolution = higher resolution (ppi = pixels/inch)

Digitization examples Place grid over image; color square if more than half is black.

Digitization examples Place grid over image; color square if more than half is black. etc..

Typical resolutions… 225 x 225 pixels (small image) 854 x 480 and higher 1920 x 1080 and ~ 100 ppi (i.e., 100x100) 300dpi + details… 12 megapixels

Space considerations Why not use highest resolution (best quality) Why not use highest resolution (best quality) Tradeoff between quality and space (file size on disk; time to transmit over network) Tradeoff between quality and space (file size on disk; time to transmit over network) 100 x 100 = 10,000 bits, but 100 x 100 = 10,000 bits, but 200 x 200 = 40,000 bits, and 200 x 200 = 40,000 bits, and 300 x 300 = 90,000 bits 300 x 300 = 90,000 bits SPACE GROWS QUADRATICALLY: n x n = n 2 SPACE GROWS QUADRATICALLY: n x n = n 2

Color Representation What kind of images can we create if we use 1 bit per pixel? How can we get more colors?

Color Representation IDEA: represent a pixel with 3 bits: 000 = no dot lit (black) 111 = R, G, B lit (white light) 100 = R lit (pure red) 110 = R, G lit (yellow light) Each pixel has 3 color dots: RGB: the three primary colors of light. PROBLEM: only allows 8 different pixel colors

3-bit color (8 colors) dithering Dithering: to create the illusion of different colors in a region, use different colored pixels. E.g., orange = alternate red and yellow pixels

Color Depth (also “Bit Depth”) Allocate more bits for each of R, G, B to describe amount of light (intensity) for each color. 6-bit color depth: = intensity 1 for red intensity 3 for green intensity 0 for blue Allows for ______________ different colors what is code for pink? 2 6 = 64

“True color” = 24 bits = 8 bits/color millions of colors: more than eye can discern Indicate RGB by 3 (decimal) numbers between 0 and 255 [example: 102, 223, 46 ] OR by 6 hex values = 2 per color = 8 bits/color) [example: 66DF2E] Color Depth

Color Cube R, G, B are three axes of a three- dimensional “cube” of color

Color Depth & Quality 1 bit4 bits 8 bits24 bits

Space considerations Quality depends on: resolution, color depth. Space required depends on: resolution, color depth. Bits Needed = num pixels x bits/pixel e.g. 600x600, truecolor --> x 24 = 8,640,000 bits = 1,080,000 bytes = 1.08 Mb file (.bmp)

More on Resolutions…. er-resolution.html er-resolution.html er-resolution.html er-resolution.html –resolutions greater than 300dpi refer to individual color dots used to make up a single pixel. al-versus-film-resolution.html al-versus-film-resolution.html al-versus-film-resolution.html al-versus-film-resolution.html –“grain size” for film comparable to resolution on high- end digital camera (about 5 microns). Resolution.html Resolution.html Resolution.html Resolution.html –sdtv versus hdtv (various versions)

Compression Run-length encoding of image: lossless.gif works by reducing 24 bit color by rounding to 256 colors (8 bits total per pixel) derived from the image, then using LZ compression. Good for drawings, images without great color depth..jpg (too complex to describe here) advantages over gif: many colors (note: uses Huffman coding) Pros and cons: gif good for sharp lines, bad for good color. jpg good for photographs..gif and.jpg are lossy compression techniques.

Vector-based representations (as opposed to “bit-map” =.bmp,.gif,.jpg) Store equations of lines, edges, regions Store equations of lines, edges, regions Very efficient for geometric contents Very efficient for geometric contents Scales beautifully Scales beautifully Scalable fonts without jaggies Scalable fonts without jaggies Flash files Flash files Disadv: hard to obtain directly from scanned images, hard to edit pixel-wise Disadv: hard to obtain directly from scanned images, hard to edit pixel-wise

Video Video = many, many, many, many images Video = many, many, many, many images Typical 30 frames per second. Typical 30 frames per second. Space requirement is simply: Space requirement is simply: (space per image) x (#seconds) x 30 Example: 600 x 600 truecolor image = 1.08 Mb Thus, roughly 30Mb per second seconds in a 90 min video 5400 seconds in a 90 min video 5400 x 30Mb = Mb = 162Gb 5400 x 30Mb = Mb = 162Gb (without compression) DVD capacity 4.7Gb. Blue Ray 50 Gb Special temporal compression techniques used for Video

Summary Higher Resolution (pixels/inch) gives better quality, but space increases quadratically. Higher Resolution (pixels/inch) gives better quality, but space increases quadratically. Bit depth (color depth) measured in bits/pixel. “Truecolor” = 24 bits, 8 for each of R, G, B. Bit depth (color depth) measured in bits/pixel. “Truecolor” = 24 bits, 8 for each of R, G, B. Space = num_pixels x bits/pixel Space = num_pixels x bits/pixel Compression techniques: run-length,.gif,.jpg. Compression techniques: run-length,.gif,.jpg. Vector-based representations have adv, disadv. Vector-based representations have adv, disadv. Video is big; compression is both spatial and temporal Video is big; compression is both spatial and temporal See for a good survey. See for a good survey.

Representing Sounds

Goals Understand how sound is represented digitally Understand how sound is represented digitally Understand sampling rate, quantization and tradeoff between quality and file size Understand sampling rate, quantization and tradeoff between quality and file size Know typical factors used in sound compression Know typical factors used in sound compression

Sound Representation Sound is a (continuous) wave To represent digitally, decide on: Sampling rate Sampling rate –how often to read the amplitude of the wave Quantization Quantization –how many bits used to represent the amplitude These two values are analogous to resolution and color depth for images…

Sampling sampling rates vs. quality of sound sampling rates vs. quality of sound slow rate misses peaks, valleys time intensity of compression wave (e.g., as measured by voltage from microphone)

Sampling - examples Not a very good approximation of the original sound curve

Sampling - examples How much sampling is enough? A better approximation of the original sound curve Flash tutorial

Quantization quantization vs. quality of sound quantization vs. quality of sound quantization Number of distinct amplitudes we choose to represent. Fewer values available creates large rounding errors

Quantization - examples Number of distinct amplitudes we can represent depends on the number of bits we use. Values must be rounded to nearest number… in the 1-bit case, “0” or “1” 1 0

Quantization - examples With 2 bits, we can represent 4 values (0,.33,.66, 1). We still must round, but rounding error is less, and curve is more closely approximated.

A/D and D/A converters Sound Cards and what they do:

Space considerations Sample Rate x Quantization x Duration Sample Rate x Quantization x Duration Raw audio 44.1Khz x 16 bits = 705Kbits/sec =.7 Mbits/sec stereo = 1.4 Mbits/sec 3-minute song = 252 Mbits ≈ 32 Mbytes 3-minute song = 252 Mbits ≈ 32 Mbytes 16 Gb iPod holds 16000/32 = 500 songs (without compression. with compression: 4000 songs) 16 Gb iPod holds 16000/32 = 500 songs (without compression. with compression: 4000 songs)

Compression Use limitations of human hearing to decide on sampling rate and quantization. Use limitations of human hearing to decide on sampling rate and quantization. Human ear can’t hear much better than 20Khz, so sampling at 44.1Khz is adequate. Human ear can’t hear much better than 20Khz, so sampling at 44.1Khz is adequate. Other limitations of our hearing, as well as Other limitations of our hearing, as well as psychoacoustics, are used in compression algorithms (e.g. masking effects), together with other compression techniques (e.g. Huffman coding). psychoacoustics Typical file types:.wav (raw),.mp3 (compressed) Typical file types:.wav (raw),.mp3 (compressed)

Summary Sound is analog, we have digital representation Sound is analog, we have digital representation D/A and A/D converters used on sound cards D/A and A/D converters used on sound cards Sampling rate is how many samples/sec are represented. (Typical = 44.1K) Sampling rate is how many samples/sec are represented. (Typical = 44.1K) Quantization is how many distinct amplitude values we can represent. (Typical = 16 bits: 65536) Quantization is how many distinct amplitude values we can represent. (Typical = 16 bits: 65536) Higher sampling, better quantization means better sound, but more space Higher sampling, better quantization means better sound, but more space Chosen sampling rate, quantization, and compression techniques rely on human perceptual capabilities (psychoacoustics) Chosen sampling rate, quantization, and compression techniques rely on human perceptual capabilities (psychoacoustics)