Image Processing. Image Processing. What is an Image? Image Resolution. Overview. Sources of Error. Filtering Blur Detect edges

Similar documents
Image Processing. What is an image? קורס גרפיקה ממוחשבת 2008 סמסטר ב' Converting to digital form. Sampling and Reconstruction.

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Image Processing 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Image Processing COS 426

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Human Vision, Color and Basic Image Processing

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

Prof. Feng Liu. Fall /04/2018

Computer Graphics (Fall 2011) Outline. CS 184 Guest Lecture: Sampling and Reconstruction Ravi Ramamoorthi

Lecture 2: Digital Image Fundamentals -- Sampling & Quantization

Aliasing and Antialiasing. What is Aliasing? What is Aliasing? What is Aliasing?

Sampling and Reconstruction

Antialiasing and Related Issues

Graphics and Image Processing Basics

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

Sampling and pixels. CS 178, Spring Marc Levoy Computer Science Department Stanford University. Begun 4/23, finished 4/25.

Image Processing. Adrien Treuille

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Raster Graphics. Overview קורס גרפיקה ממוחשבת 2008 סמסטר ב' What is an image? What is an image? Image Acquisition. Image display 5/19/2008.

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Raster Graphics 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Image and Video Processing

Sampling and reconstruction. CS 4620 Lecture 13

Image Filtering. Median Filtering

Filters. Materials from Prof. Klaus Mueller

Sampling and reconstruction

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

Computer Vision, Lecture 3

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

Sampling Theory. CS5625 Lecture Steve Marschner. Cornell CS5625 Spring 2016 Lecture 7

image Scanner, digital camera, media, brushes,

Lecture Schedule: Week Date Lecture Title

Sampling and reconstruction

Last Lecture. photomatix.com

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Sampling and Reconstruction. Today: Color Theory. Color Theory COMP575

Announcements. Image Processing. What s an image? Images as functions. Image processing. What s a digital image?

Sampling and Reconstruction

Filtering. Image Enhancement Spatial and Frequency Based

Image Processing. 2. Point Processes. Computer Engineering, Sejong University Dongil Han. Spatial domain processing

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

To Do. Advanced Computer Graphics. Image Compositing. Digital Image Compositing. Outline. Blue Screen Matting

1.Discuss the frequency domain techniques of image enhancement in detail.

Image Filtering and Gaussian Pyramids

CT111 Introduction to Communication Systems Lecture 9: Digital Communications

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Image Sampling. Moire patterns. - Source: F. Durand

Analysis and Design of Vector Error Diffusion Systems for Image Halftoning

Image Processing for feature extraction

Transforms and Frequency Filtering

Last Lecture. photomatix.com

Digital Halftoning. Sasan Gooran. PhD Course May 2013

Image Interpolation. Image Processing

Study guide for Graduate Computer Vision

Virtual Restoration of old photographic prints. Prof. Filippo Stanco

MULTIMEDIA SYSTEMS

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Image Scaling. This image is too big to fit on the screen. How can we reduce it? How to generate a halfsized

Lecture 1: image display and representation

Exercise Problems: Information Theory and Coding

2D Discrete Fourier Transform

Fig 1: Error Diffusion halftoning method

Image Capture and Problems

Methods for Generating Blue-Noise Dither Matrices for Digital Halftoning

C. A. Bouman: Digital Image Processing - January 9, Digital Halftoning

Texture mapping from 0 to infinity

Image Processing (EA C443)

What is an image? Images and Displays. Representative display technologies. An image is:

ELEC Dr Reji Mathew Electrical Engineering UNSW

Images and Displays. CS4620 Lecture 15

Digital Image Processing

Fourier Transforms in Radio Astronomy

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

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

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

Error Diffusion and Delta-Sigma Modulation for Digital Image Halftoning

Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology, Understand general usage of color

CSE 564: Scientific Visualization

International Conference on Advances in Engineering & Technology 2014 (ICAET-2014) 48 Page

CSCI 1290: Comp Photo

Signals and Systems. Lecture 13 Wednesday 6 th December 2017 DR TANIA STATHAKI

Half-Tone Watermarking. Multimedia Security

ME scope Application Note 01 The FFT, Leakage, and Windowing

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

Evaluation of Visual Cryptography Halftoning Algorithms

CS 775: Advanced Computer Graphics. Lecture 12 : Antialiasing

Design IV. E232 Spring 07

Cameras. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

A New Metric for Color Halftone Visibility

Image Representations, Colors, & Morphing. Stephen J. Guy Comp 575

Monochrome Image Reproduction

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

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

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

Raster Images and Displays

An Improved Fast Color Halftone Image Data Compression Algorithm

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

Frequency Domain Enhancement

Image Enhancement contd. An example of low pass filters is:

Sampling and Reconstruction of Analog Signals

CS 465 Prelim 1. Tuesday 4 October hours. Problem 1: Image formats (18 pts)

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

Transcription:

Thomas Funkhouser Princeton University COS 46, Spring 004 Quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation ing Blur Detect edges Warping Scale Rotate Warp Combining Composite Morph What is an Image? An image is a D rectilinear array of samples Image Resolution Intensity resolution Each pixel has only Depth bits for colors/intensities Spatial resolution Image has only Width x Height pixels Temporal resolution Monitor refreshes images at only Rate Hz Continuous image Digital image Typical Resolutions Width x Height Depth Rate NTSC 640 x 480 8 30 Workstation 80 x 04 4 75 Film 3000 x 000 4 Laser Printer 6600 x 500 - Sources of Error Intensity quantization Not enough intensity resolution Spatial aliasing Not enough spatial resolution Temporal aliasing Not enough temporal resolution Overview Image representation What is an image? Halftoning and dithering Reduce visual artifacts due to quantization Sampling and reconstruction Reduce visual artifacts due to aliasing E = ( I ( x, y) P( x, y) ) ( x, y)

Quantization Artifacts due to limited intensity resolution Frame buffers have limited number of bits per pixel Physical devices have limited dynamic range P(x, y) = trunc(i(x, y) + 0.5) P(x,y) I(x,y) I(x,y) P(x,y) ( bits per pixel) Images with decreasing bits per pixel: Reducing Effects of Quantization Halftoning Classical halftoning ing Random dither Ordered dither Error diffusion dither 8 bits 4 bits bits bit Notice contouring Classical Halftoning Use dots of varying size to represent intensities Area of dots proportional to intensity in image Classical Halftoning I(x,y) P(x,y) Newspaper Image From New York Times, 9//99

Halftone patterns Use cluster of pixels to represent intensity Trade spatial resolution for intensity resolution ing Distribute errors among pixels Exploit spatial integration in our eye greater range of perceptible intensities Figure 4.37 from H&B (8 bits) Uniform Quantization ( bit) Floyd-Steinberg ( bit) Random Randomize quantization errors Errors appear as noise Random P(x,y) P(x,y) I(x,y) I(x,y) P(x, y) = trunc(i(x, y) + noise(x,y) + 0.5) (8 bits) Uniform Quantization ( bit) Random ( bit) Ordered Pseudo-random quantization errors Matrix stores pattern of threshholds i = x mod n j = y mod n e = I(x,y) - trunc(i(x,y)) if (e > D(i,j)) P(x,y) = ceil(i(x, y)) else P(x,y) = floor(i(x,y)) D 3 = 0 Ordered Bayer s ordered dither matrices 4Dn + D (,) U Dn = 4Dn + D (,) U D 3 = 0 n n D 4 4D 4D 5 3 = 0 n n + D (,) U + D (,) U 7 3 4 4 8 n n 5 9 6 0 3

Ordered Error Diffusion Spread quantization error over neighbor pixels Error dispersed to pixels right and below α β γ δ (8 bits) Random ( bit) Ordered ( bit) α + β + γ + δ =.0 Figure 4.4 from H&B Error Diffusion Overview Image representation What is an image? Halftoning and dithering Reduce visual artifacts due to quantization Sampling and reconstruction Reduce visual artifacts due to aliasing (8 bits) Random ( bit) Ordered ( bit) Floyd-Steinberg ( bit) What is an Image? Sampling and ion An image is a D rectilinear array of samples Sampling ion Continuous image Digital image 4

Sampling and ion Quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation ing Blur Detect edges Warping Scale Rotate Warps Combining Composite Morph Figure 9.9 FvDFH Adjusting Brightness Simply scale pixel components Must clamp to range (e.g., 0 to 55) Adjusting Contrast Compute mean luminance for all pixels luminance = 0.30*r + 0.59*g + 0.*b Scale deviation from for each pixel component Must clamp to range (e.g., 0 to 55) Brighter More Contrast Quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation ing Blur Detect edges Warping Scale Rotate Warps Combining Composite Morph Consider reducing the image resolution image /4 resolution 5

Image processing is a resampling problem Resampling Aliasing In general: Artifacts due to under-sampling or poor reconstruction Specifically, in graphics: Spatial aliasing Temporal aliasing Thou shalt avoid aliasing! Under-sampling Figure 4.7 FvDFH Spatial Aliasing Artifacts due to limited spatial resolution Spatial Aliasing Artifacts due to limited spatial resolution Jaggies Temporal Aliasing Artifacts due to limited temporal resolution Strobing Flickering Temporal Aliasing Artifacts due to limited temporal resolution Strobing Flickering 6

Temporal Aliasing Artifacts due to limited temporal resolution Strobing Flickering Temporal Aliasing Artifacts due to limited temporal resolution Strobing Flickering Sampling Theory When does aliasing happen? How many samples are required to represent a given signal without loss of information? What signals can be reconstructed without loss for a given sampling rate? Spectral Analysis Spatial domain: Function: f(x) ing: convolution Frequency domain: Function: F(u) ing: multiplication Any signal can be written as a sum of periodic functions. Fourier Fourier Fourier transform: i πxu F u = f x e dx ( ) ( ) Inverse Fourier transform: Figure.6 Wolberg f ( x) + i πux = F( u) e du 7

Sampling Theorem A signal can be reconstructed from its samples, if the original signal has no frequencies above / the sampling frequency - Shannon The minimum sampling rate for bandlimited function is called Nyquist rate Antialiasing at higher rate Not always possible Doesn t always solve problem Pre-filter to form bandlimited signal Form bandlimited function (low-pass filter) Trades aliasing for blurring A signal is bandlimited if its highest frequency is bounded. The frequency is called the bandwidth. ed function ed function ed function ed function Continuous Function ed function ed function Discrete s ed function ed function ed Function 8

ed function ed function ed function ed Function ed function Bandlimited Function ed function ed function ed function Discrete samples ed function Ideal Bandlimiting Practical Frequency domain Finite low-pass filters Point sampling (bad) Triangle filter Gaussian filter Spatial domain 0 fmax sin πx Sinc( x) = πx Convolution ed function ed function Figure 4.5 Wolberg 9

Convolution Spatial domain: output pixel is weighted sum of pixels in neighborhood of input image Pattern of weights is the filter Convolution with a Triangle Example : Convolution with a Triangle Example : 0.5 0.5 0.5 Convolution with a Triangle Example : 0.5 0.5 0.5 Convolution with a Triangle Example : 0.5 0.5 0.5 Convolution with a Triangle Example : 0.5 0.5 0.5 0

Convolution with a Triangle Example : 0.67 0.33 Convolution with a Triangle Example : Convolution with a Triangle Example : Convolution with a Triangle Example : 0.5 0.40 0.35 0.0 Convolution with a Triangle Example : Convolution with a Triangle Example 3: 0.5 0.40 0.35 0.0 Figure.4 Wolberg

Convolution with a Gaussian Example: Figure.4 Wolberg Quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation ing Blur Detect edges Warping Scale Rotate Warps Combining Composite Morph Adjust Blurriness Convolve with a filter whose entries sum to one Each pixel becomes a weighted average of its neighbors Edge Detection Convolve with a filter that finds differences between neighbor pixels Blur Detect edges 6 = 6 6 6 4 6 6 6 6 6 = + 8 Quantization Random dither Ordered dither Floyd-Steinberg dither Pixel operations Add random noise Add luminance Add contrast Add saturation ing Blur Detect edges Warping Scale Rotate Warps Combining Composite Morph Scaling Resample with triangle or Gaussian filter More on this next lecture! /4X resolution 4X resolution

Image processing is a resampling problem Avoid aliasing Use filtering Summary Image representation A pixel is a sample, not a little square Images have limited resolution Halftoning and dithering Reduce visual artifacts due to quantization Distribute errors among pixels» Exploit spatial integration in our eye Sampling and reconstruction Reduce visual artifacts due to aliasing to avoid undersampling» Blurring is better than aliasing 3