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

Similar documents
Image Perception & 2D Images

Compression and Image Formats

15110 Principles of Computing, Carnegie Mellon University

Camera Image Processing Pipeline: Part II

15110 Principles of Computing, Carnegie Mellon University

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

Ch. 3: Image Compression Multimedia Systems

Camera Image Processing Pipeline: Part II

Assistant Lecturer Sama S. Samaan

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:

2.1. General Purpose Run Length Encoding Relative Encoding Tokanization or Pattern Substitution

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

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

Fundamentals of Multimedia

Introduction to More Advanced Steganography. John Ortiz. Crucial Security Inc. San Antonio

Lossy and Lossless Compression using Various Algorithms

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

image Scanner, digital camera, media, brushes,

Chapter 9 Image Compression Standards

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

STANDARDS? We don t need no stinkin standards! David Ski Witzke Vice President, Program Management FORAY Technologies

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

Image Processing. Adrien Treuille

LECTURE 03 BITMAP IMAGE FORMATS

Information Hiding: Steganography & Steganalysis

Computer and Machine Vision

OFFSET AND NOISE COMPENSATION

Images and Colour COSC342. Lecture 2 2 March 2015

LECTURE 02 IMAGE AND GRAPHICS

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

2. REVIEW OF LITERATURE

JPEG Encoder Using Digital Image Processing

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

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

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

UNIT 7C Data Representation: Images and Sound

Module 6 STILL IMAGE COMPRESSION STANDARDS

Digital Media. Lecture 6: Color Part 1. Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan

Graphics and Image Processing Basics

Determination of the MTF of JPEG Compression Using the ISO Spatial Frequency Response Plug-in.

Digital Image Processing

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

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

CS4495/6495 Introduction to Computer Vision. 2C-L3 Aliasing

Lecture 2 Digital Image Fundamentals. Lin ZHANG, PhD School of Software Engineering Tongji University Fall 2016

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Bitmap Image Formats

Digital Image Processing

Digital Asset Management 2. Introduction to Digital Media Format

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

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

Prof. Feng Liu. Fall /02/2018

Course Objectives & Structure

Introduction to Multimedia Computing

4 Images and Graphics

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Digital Image Processing Introduction

Templates and Image Pyramids

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

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

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

Applying mathematics to digital image processing using a spreadsheet

Coreldraw Crash Course

PENGENALAN TEKNIK TELEKOMUNIKASI CLO

Computer Graphics. Rendering. Rendering 3D. Images & Color. Scena 3D rendering image. Human Visual System: the retina. Human Visual System

Introduction to Photography

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

Last Lecture. photomatix.com

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

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

Unit 1.1: Information representation

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

Developing Multimedia Assets using Fireworks and Flash

What You ll Learn Today

Study guide for Graduate Computer Vision

MULTIMEDIA SYSTEMS

Templates and Image Pyramids

Image Processing. Michael Kazhdan ( /657) HB Ch FvDFH Ch. 13.1

Human Visual System. Digital Image Processing. Digital Image Fundamentals. Structure Of The Human Eye. Blind-Spot Experiment.

Understanding Matrices to Perform Basic Image Processing on Digital Images

Detection of Image Forgery was Created from Bitmap and JPEG Images using Quantization Table

Digital Image Processing

Anti aliasing and Graphics Formats

A COMPARATIVE ANALYSIS OF DCT AND DWT BASED FOR IMAGE COMPRESSION ON FPGA

Image compression with multipixels

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

University of Amsterdam System & Network Engineering. Research Project 1. Ranking of manipulated images in a large set using Error Level Analysis

6. Graphics MULTIMEDIA & GRAPHICS 10/12/2016 CHAPTER. Graphics covers wide range of pictorial representations. Uses for computer graphics include:

Huffman Coding For Digital Photography

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

Bit Depth. Introduction

Color and Perception

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

EC-433 Digital Image Processing

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Megapixels and more. The basics of image processing in digital cameras. Construction of a digital camera

Adobe Illustrator CS6

Hybrid Coding (JPEG) Image Color Transform Preparation

Pooja Rani(M.tech) *, Sonal ** * M.Tech Student, ** Assistant Professor

Transcription:

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

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

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

Bitmapped image compression Run length encoding: 9RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 2RGB 6RGB 9RGB 64 pixels 9(,,) 6(,,) 2(,,)6(,,) 2(,,) 6(,,)2(,,) 6(,,) 2(,,)6(,,) 2(,,) 6(,,)9(,,) = 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: RLE compression... RGB RGB RGB RGB RGB... RGB RGB RGB -> 256 bytes 64 pixels

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 Run length encoding: Consider this image: RLE compression... RGB RGB RGB RGB RGB... RGB RGB RGB -> 256 bytes 64 pixels

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

Bitmapped image compression JPEG 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 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,3, bytes The jpeg file is only 56, 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)=> 64-6 = 48 pixels You have to remove 3/4 of the pixels! 64 pixels 6 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 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 2 3 How do you do this? Remember it s just numbers in there!

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

Go to 4. STEM presentation

Blur filter: Convolution under the sheets

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

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 /9 /9 /9 /9 /9 /9 `

Convolution: How it works /9 /9 /9 /9 /9 /9 ` X

Convolution: How it works ` /9 /9 /9 /9 /9 /9 X

Convolution: How it works /9 x + x + /9 x + /9 x + x + /9 x + /9 x + x + /9 x = + 85 + + + 85 + + + 85 + = /9 /9 /9 /9 /9 /9

Convolution: How it works /9 /9 /9 /9 /9 /9 X

Convolution: How it works /9 x + x + /9 x + /9 x + x + /9 x + /9 x + x + /9 x = + 85 + + + 85 + + + + = 7 /9 /9 /9 /9 /9 /9 7

Convolution: How it works /9 /9 /9 /9 /9 /9 7 X

Convolution: How it works /9 x + x + /9 x + /9 x + x + /9 x + /9 x + x + /9 x = + 85 + + +++ + 85+ = 7 /9 /9 /9 /9 /9 /9 7 7

Convolution: How it works /9 /9 /9 /9 /9 /9 7 7 X

Convolution: How it works /9 x + x + /9 x + /9 x + x + /9 x + /9 x + x + /9 x = +++ + 85+ + + 85+ = 7 /9 /9 /9 /9 /9 /9 7 7 7

Convolution: How it works /9 /9 /9 /9 /9 /9 7 7 7 X

Convolution: How it works /9 x + x + /9 x + /9 x + x + /9 x + /9 x + x + /9 x = + 85 + + + 85 + + + 85+ = /9 /9 /9 /9 /9 /9 7 7 7

Convolution: How it works 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

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!