Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.

Slides:



Advertisements
Similar presentations
Image Processing. Overview ImagesPixel Filters Neighborhood Filters Dithering.
Advertisements

Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Image Filtering, Part 2: Resampling Today’s readings Forsyth & Ponce, chapters Forsyth & Ponce –
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.
Announcements Mailing list: –you should have received messages Project 1 out today (due in two weeks)
Edges and Scale Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski – From Sandlot ScienceSandlot.
Lecture 2: Edge detection and resampling
Image transformations, Part 2 Prof. Noah Snavely CS1114
Image Sampling Moire patterns
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
Lecture 3: Edge detection, continued
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Lecture 2: Image filtering
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
Computational Photography: Fourier Transform Jinxiang Chai.
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
Image Sampling Moire patterns -
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Fourier Analysis : Rendering and Image Processing Alexei Efros.
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Image Resampling CS4670: Computer Vision Noah Snavely.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Processing Edge detection Filtering: Noise suppresion.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski, Ch 4.1.2, From Sandlot.
Instructor: S. Narasimhan
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
EE 4780 Edge Detection.
Many slides from Steve Seitz and Larry Zitnick
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
Lecture 5: Fourier and Pyramids
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Miguel Tavares Coimbra
Image Resampling & Interpolation
Edge Detection slides taken and adapted from public websites:
Image Sampling Moire patterns
Gonzalez & Woods, and Efros)
Edge Detection CS 678 Spring 2018.
Image Sampling Moire patterns
Jeremy Bolton, PhD Assistant Teaching Professor
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
More Image Manipulation
Edge Detection Today’s reading
CSCE 643 Computer Vision: Thinking in Frequency
Samuel Cheng Slide credits: Noah Snavely
Edge Detection Today’s reading
Lecture 2: Edge detection
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Edge Detection Today’s reading
Image Resampling & Interpolation
Resampling.
Edge Detection Today’s readings Cipolla and Gee Watt,
Lecture 2: Edge detection
Samuel Cheng Slide credits: Noah Snavely
IT472 Digital Image Processing
IT472 Digital Image Processing
Presentation transcript:

Last Lecture photomatix.com

Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image Pyramids (Gaussian and Laplacian) Removing handshake blur from a single image

Image as a discreet function Represented by a matrix

What is image filtering? Modify the pixels in an image based on some function of a local neighborhood of the pixels Local image data 7 Modified image data Some function

Linear functions Simplest: linear filtering. –Replace each pixel by a linear combination of its neighbors. The prescription for the linear combination is called the “convolution kernel” Local image datakernel 7 Modified image data

Convolution I

Linear filtering (warm-up slide) original 0 Pixel offset coefficient 1.0 ?

Linear filtering (warm-up slide) original 0 Pixel offset coefficient 1.0 Filtered (no change)

Linear filtering 0 Pixel offset coefficient original 1.0 ?

shift 0 Pixel offset coefficient original 1.0 shifted

Linear filtering 0 Pixel offset coefficient original 0.3 ?

Blurring 0 Pixel offset coefficient original 0.3 Blurred (filter applied in both dimensions).

0 Pixel offset coefficient 0.3 original 8 filtered 2.4 impulse Blur Examples

0 Pixel offset coefficient 0.3 original 8 filtered impulse edge 0 Pixel offset coefficient 0.3 original 8 filtered 2.4 Blur Examples

original ? Linear filtering (warm-up slide)

original Filtered (no change) Linear Filtering (no change)

original ? Linear Filtering

(remember blurring) 0 Pixel offset coefficient original 0.3 Blurred (filter applied in both dimensions).

original Sharpened original Sharpening

Sharpening example coefficient -0.3 original 8 Sharpened (differences are accentuated; constant areas are left untouched)

Sharpening beforeafter

Spatial resolution and color R G B original

Blurring the G component R G B original processed

Blurring the R component original processed R G B

Blurring the B component original R G B processed

L a b A rotation of the color coordinates into directions that are more perceptually meaningful: L: luminance, a: red-green, b: blue-yellow Lab Color Component

L a b original processed Bluring L

original L a b processed Bluring a

original L a b processed Bluring b

Application to image compression (compression is about hiding differences from the true image where you can’t see them).

Edge Detection Convert a 2D image into a set of curves –Extracts salient features of the scene –More compact than pixels

How can you tell that a pixel is on an edge?

Image gradient The gradient of an image: The gradient direction is given by: The gradient points in the direction of most rapid change in intensity –how does the gradient relate to the direction of the edge? The edge strength is given by the gradient magnitude

Effects of noise Consider a single row or column of the image –Plotting intensity as a function of position gives a signal Where is the edge? How to compute a derivative?

Where is the edge? Solution: smooth first Look for peaks in

Derivative theorem of convolution This saves us one operation:

Laplacian of Gaussian Consider Laplacian of Gaussian operator Where is the edge?Zero-crossings of bottom graph

Canny Edge Detector Smooth image I with 2D Gaussian: Find local edge normal directions for each pixel Along this direction, compute image gradient Locate edges by finding max gradient magnitude (Non-maximum suppression)

Non-maximum Suppression Check if pixel is local maximum along gradient direction –requires checking interpolated pixels p and r

The Canny Edge Detector original image (Lena)

The Canny Edge Detector magnitude of the gradient

The Canny Edge Detector After non-maximum suppression

Canny Edge Detector Canny with original The choice of depends on desired behavior –large detects large scale edges –small detects fine features

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

Image sub-sampling Throw away every other row and column to create a 1/2 size image - called image sub-sampling 1/4 1/8

Image sub-sampling 1/4 (2x zoom) 1/8 (4x zoom) Why does this look so crufty? 1/2

Even worse for synthetic images

Really bad in video

Alias: n., an assumed name Picket fence receding Into the distance will produce aliasing… Input signal: x = 0:.05:5; imagesc(sin((2.^x).*x)) Matlab output: WHY? Aj-aj-aj: Alias! Not enough samples

Aliasing occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image—an alias Where can it happen in images? During image synthesis: –sampling continous singal into discrete signal –e.g. ray tracing, line drawing, function plotting, etc. During image processing: –resampling discrete signal at a different rate –e.g. Image warping, zooming in, zooming out, etc. To do sampling right, need to understand the structure of your signal/image Enter Monsieur Fourier…

Antialiasing What can be done? 1.Raise sampling rate by oversampling –Sample at k times the resolution

Antialiasing What can be done? 1.Raise sampling rate by oversampling –Sample at k times the resolution

Antialiasing What can be done? 1.Raise sampling rate by oversampling –Sample at k times the resolution 2. Lower the max frequency by prefiltering –Smooth the signal enough –Works on discrete signals

Antialiasing What can be done? 1.Raise sampling rate by oversampling –Sample at k times the resolution 2. Lower the max frequency by prefiltering –Smooth the signal enough –Works on discrete signals 3. Improve sampling quality with better sampling (CS559)

The Gaussian Pyramid High resolution Low resolution blur sub-sample blur sub-sample

Gaussian pre-filtering G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample

Subsampling with Gaussian pre-filtering G 1/4G 1/8Gaussian 1/2 Solution: filter the image, then subsample

Compare with... 1/4 (2x zoom) 1/8 (4x zoom) 1/2

Pyramids at Same Resolution

expand Gaussian Pyramid Laplacian Pyramid The Laplacian Pyramid - = - = - =

Recap Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image Pyramids (Gaussian and Laplacian) Next …