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

Slides:



Advertisements
Similar presentations
Digital Color 24-bit Color Indexed Color Image file compression
Advertisements

Computer Science 335 Data Compression.
Lecture 2: Image filtering
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Multimedia Data The DCT and JPEG Image Compression Dr Mike Spann Electronic, Electrical and Computer.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
Image Compression JPEG. Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg and can be embedded.
Digital Media Dr. Jim Rowan ITEC 2110 Color. COLOR Is a mess It’s a subjective sensation PRODUCED in the brain Color differs for light and paint/ink Printing.
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Digital Media Lecture 6: Color Part 1 Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
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.
Page 18/30/2015 CSE 40373/60373: Multimedia Systems 4.2 Color Models in Images  Colors models and spaces used for stored, displayed, and printed images.
JPEG C OMPRESSION A LGORITHM I N CUDA Group Members: Pranit Patel Manisha Tatikonda Jeff Wong Jarek Marczewski Date: April 14, 2009.
Digital Media Lecture 2.1: SemesterOverview Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
Klara Nahrstedt Spring 2011
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.
Digital Media Dr. Jim Rowan ITEC 2110 Color. Question! Inside Photoshop and Gimp there are image filters that, among other things, allow you to blur the.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
JPEG CIS 658 Fall 2005.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
Digital Media Lecture 3: Image Encoding Bitmapped images Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
Digital Media Lecture 4.1: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Digital Media Dr. Jim Rowan ITEC Up Next! In the next several lectures we will be covering these topics: –Vector graphics –Bitmapped graphics –Color.
Digital Media Lecture 2: SemesterOverview Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
09/17/02 (C) 2002, University of Wisconsin, CS 559 Last Time Color Spaces File formats.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
Digital Media Dr. Jim Rowan ITEC 2110 Images: Chapters 3, 4 & 5.
 By Bob “The Bird” Fiske & Anita “The Snail” Cost.
POWERPOINT PLUS 11/17/07 Class Notes. WHAT IS A PIXEL A pixel is a number that represents the intensity of light at a square spot in the picture. Pixels.
Introduction to Images & Graphics JMA260. Objectives Images introduction Photoshop.
JPEG.
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.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
Image File Formats Harrow Computer Club – Wed, 1 Dec 2010 Bob Watson MA CMath MIMA MBCS.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
Digital Media Lecture 4.2: Image Encoding Practice Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
Digital Media Lecture 2: SemesterOverview Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
Fundamentals of Data Representation Yusung Kim
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.
Computer Science Higher
Digital Media Lecture 4.1: Image Encoding Practice
JPEG.
Chapter III, Desktop Imaging Systems and Issues: Lesson IV Working With Images
Dr. Jim Rowan ITEC 2110 Bitmapped Images
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
Digital Media Dr. Jim Rowan ITEC 2110.
Dr. Jim Rowan ITEC 2110 Chapter 3
Dr. Jim Rowan ITEC 2110 Bitmapped Images
Image Compression Techniques
Presentation transcript:

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

Bitmapped image compression Consider this image: With no compression... RGB encoding => 64 x 3 = 192 bytes 64 pixels

A Side Note We’ve been talking about RGB encoding for images… So… How many different colors can you make if using a 24 bit RGB color scheme? 2**24 = 16,777,216 different colors

Bitmapped image compression 64 pixels Color table representation: With 2 colors: # # bytes for the color table -64 X 1 = 64 / 8 = 8 bytes for the pointer table = 14 bytes total

Bitmapped image compression Run length encoding: 64 pixels 9RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 9RGB 9(0,0,255) 6(255,0,0) 2(0,0,255)6(255,0,0) 2(0,0,255) 6(255,0,0)2(0,0,255) 6(255,0,0) 2(0,0,255)6(255,0,0) 2(0,0,255) 6(255,0,0)9(0,0,255) = 52 bytes

Bitmapped image compression Run length encoding: RLE gets its advantage when there are a number of pixels next to one another that are the same color This advantage is dependent on the CONTENT of the image. Why? Could RLE result in a larger image? How?

Bitmapped image compression Run length encoding: Consider this image: 64 pixels RLE compression... 1RGB 1RGB 1RGB... 1RGB 1RGB 1RGB -> 256 bytes

Bitmapped image compression Lossless or Lossy? 24 bit RGB encoding is lossless What about table encoding? Lossless and lossy It depends on…? What about RLE encoding? Lossless

Bitmapped image compression JPEG JPG is Lossy Best suited for natural photographs Fine details with continuous tone changes JPEG takes advantage of the fact that humans don’t perceive the effect of high frequencies accurately High frequency components are associated with abrupt changes in image intensity… like a hard edge

JPEG finds these high frequency components by treating the image as a matrix Using the Discrete Cosine Transform (DCT) to convert an array of pixels into an array of coefficients The DCT is expensive computationally so the image is broken into 8x8 pixel squares and applied to each of the squares Bitmapped image compression JPEG

The high frequency components do not contribute much to the perceptible quality of the image So JPEG encodes these frequencies at different quantization levels… The low frequency components are with greater detail than the high frequency changes. ==>JPEG uses more storage space for the more visible elements of an image Bitmapped image compression JPEG

Why use a lossy compression technique? It is effective for the kinds of images it is intended for ==> 95% reduction in size But it suffers from artifacts like edges that blur... WHY? Can the difference be seen? HMMMmmmm… Bitmapped image compression JPEG

Bitmapped image compression Original file zoomed in

Bitmapped image compression Comparing tiff & jpeg

Bitmapped image compression JPEG Again… Why use a lossy compression technique? For this example: The original.tiff file is 1,300,000 bytes The jpeg file is only 156,000 bytes When viewing the two full size images you cannot see the minute differences Only zooming in to the image shows the artifacts caused by jpeg compression

Side Note! To make matters worse… Humans are a mess! The human vision system is very complex Upside down Split- left side of eye to right side of brain Right side of eye to left side of brain Cones and rods not uniformly distributed Cones and rods are upside down resulting in blind spots in each eye that we just ignore! Partially responsible for making lossy techniques work… you don’t see what you think you see ==>

Optical illusions Humans are a mess! See Additional Class Information: Illusions

Bitmapped image compression returning to Resizing issues…

Resizing issues Here the original 4x4 image is doubled in both dimensions to 8x8 by adding pixels But this example is pretty simple because the original is all one color…

Resizing issues If you double both dimensions you have to add pixels... But what color? ? Well, the answer is… it depends! ? ? ?

Resizing issues If you double both dimensions you have to add pixels... But what color? ? The simplest approach would be to copy the color but… You can consider the colors that surround the original pixel ? ? ?

Resizing issues If you cut each of the dimensions in half you remove… (8x8 -> 4x4)=> = 48 pixels You have to remove 3/4 of the pixels! 64 pixels 16 pixels How do you decide which pixels to remove?

Resizing issues One answer: throw them away! Here it works... but only because it is a solid color 1 2 3

Resizing issues But what if it is multi-colored? You can use the information in the surrounding pixels to influence the remaining pixel How do you do this? Remember… it’s just numbers in there! 1 2 3

Convolution Underlies much of bitmapped image processing including downsizing and filters like blur and sharpen 1 2 3

Blur filter: Convolution under the sheets

Convolution: How it works Images as piles of numbers: Art and Mathematics Collide! (of Bezier Curves and Convolution) Images are collections of numbers

Convolution: How it works Convolution uses a convolution matrix (in this case 3 X 3) to process the original image one pixel at a time

Convolution: How it works Resulting in a completely new image… But how?

Convolution: How it works 0/93/90/9 3/90/9 3/90/9 255`

Convolution: How it works 0/93/90/9 3/90/9 3/90/9 X 255`

Convolution: How it works 0/93/90/9 3/90/9 3/90/9 X 255`

Convolution: How it works 0/93/90/9 3/90/9 3/90/ /9 x /9 x /9 x /9 x /9 x /9 x 255 = = 255

Convolution: How it works 0/93/90/9 3/90/9 3/90/9 255 X

Convolution: How it works 0/93/90/9 3/90/9 3/90/ /9 x /9 x /9 x /9 x 0+ 3/9 x 0 + 0/9 x 0= = 170

Convolution: How it works 0/93/90/9 3/90/9 3/90/ X

Convolution: How it works 0/93/90/9 3/90/9 3/90/ /9 x /9 x /9 x /9 x 0 + 3/9 x 0+ 0/9 x 0+ 0/9 x /9 x /9 x 255 = = 170

Convolution: How it works 0/93/90/9 3/90/9 3/90/ X

Convolution: How it works 0/93/90/9 3/90/9 3/90/ /9 x 0 + 3/9 x 0 + 0/9 x 0 + 0/9 x /9 x /9 x /9 x /9 x /9 x 255 = = 170

Convolution: How it works 0/93/90/9 3/90/9 3/90/ X

Convolution: How it works 0/93/90/9 3/90/9 3/90/ /9 x /9 x /9 x /9 x /9 x /9 x 255 = = 255

Convolution: How it works

Convolution: How it works In short… –the math is simple –there’s a lot of multiplication –there’s a lot of addition –just keeping track of where you are is really the only issue here!