Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.

Slides:



Advertisements
Similar presentations
Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Advertisements

Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Computational Photography: Sampling + Reconstruction Connelly Barnes Slides from Alexei Efros and Steve Marschner.
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
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.
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
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.
Lecture 4: Image Resampling and Reconstruction CS4670: Computer Vision Kavita Bala.
Image Processing Edge detection Filtering: Noise suppresion.
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.
Many slides from Steve Seitz and Larry Zitnick
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.
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.
Lecture 8: Edges and Feature Detection
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Miguel Tavares Coimbra
Image Resampling & Interpolation
Edge Detection slides taken and adapted from public websites:
Many slides from Steve Seitz and Larry Zitnick
Image Sampling Moire patterns
Edge Detection CS 678 Spring 2018.
Lecture 2: Edge detection
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
Image Processing Today’s readings For Monday
Lecture 2: Edge detection
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
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
Presentation transcript:

Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science

Announcements TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA Find partners on piazza PA 1 will be out on Monday Quiz on Monday or Wednesday, beginning of class

Why edges? TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA Humans are sensitive to edges Convert a 2D image into a set of curves – Extracts salient features of the scene, more compact

Origin of Edges Edges are caused by a variety of factors depth discontinuity surface color discontinuity illumination discontinuity surface normal discontinuity

Images as functions… Edges look like steep cliffs

Characterizing edges An edge is a place of rapid change in the image intensity function image intensity function (along horizontal scanline) first derivative edges correspond to extrema of derivative Source: L. Lazebnik

How can we differentiate a digital image F[x,y]? – Option 1: reconstruct a continuous image, f, then compute the derivative – Option 2: take discrete derivative (finite difference) 1 How would you implement this as a linear filter? Image derivatives 1 : : Source: S. Seitz

The gradient points in the direction of most rapid increase in intensity Image gradient The gradient of an image: The edge strength is given by the gradient magnitude: The gradient direction is given by: how does this relate to the direction of the edge? Source: Steve Seitz

Image gradient Source: L. Lazebnik

Effects of noise Where is the edge? Source: S. Seitz Noisy input image

Solution: smooth first f h f * h Source: S. Seitz To find edges, look for peaks in

Differentiation is a convolution Convolution is associative: This saves us one operation: Associative property of convolution f Source: S. Seitz

2D edge detection filters Gaussian derivative of Gaussian ( x )

Derivative of Gaussian filter x-direction y-direction

The Sobel operator Common approximation of derivative of Gaussian – A mask (not a convolution kernel) The standard defn. of the Sobel operator omits the 1/8 term –doesn’t make a difference for edge detection –the 1/8 term is needed to get the right gradient magnitude

Sobel operator: example Source: Wikipedia

Questions?

Image Resampling CS4670: Computer Vision

Image Scaling This image is too big to fit on the screen. How can we generate a half-sized version? Source: S. Seitz

Image sub-sampling Throw away every other row and column to create a 1/2 size image - called image sub-sampling 1/4 1/16 Source: S. Seitz

Image sub-sampling 1/4 (2x zoom) 1/16 (4x zoom) Why does this look so crufty? 1/2 Source: S. Seitz

Image sub-sampling Source: F. Durand

Even worse for synthetic images Source: L. Zhang

What is aliasing? What if we “missed” things between the samples? Simple example: undersampling a sine wave – unsurprising result: information is lost – surprising result: indistinguishable from lower frequency – also was always indistinguishable from higher frequencies – aliasing: signals “traveling in disguise” as other frequencies 28

Wagon-wheel effect (See Source: L. Zhang

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 To do sampling right, need to understand the structure of your signal/image Enter Monsieur Fourier… To avoid aliasing: – sampling rate ≥ 2 * max frequency in the image said another way: ≥ two samples per cycle – This minimum sampling rate is called the Nyquist rate Source: L. Zhang

Nyquist limit – 2D example Good sampling Bad sampling

Aliasing When downsampling by a factor of two – Original image has frequencies that are too high How can we fix this?

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

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

Compare with... 1/4 (2x zoom) 1/8 (4x zoom) 1/2 Source: S. Seitz

Gaussian pre-filtering Solution: filter the image, then subsample blur F 0 H * * subsample blur subsample … F1F1 F1F1 F 1 H * * F2F2 F2F2 F0F0 F0F0

blur F 0 H * * subsample blur subsample … F1F1 F1F1 F 1 H * * F2F2 F2F2 F0F0 F0F0 { Gaussian pyramid

Gaussian pyramids [Burt and Adelson, 1983] In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform Gaussian Pyramids have all sorts of applications in computer vision Source: S. Seitz

Gaussian pyramids [Burt and Adelson, 1983] How much space does a Gaussian pyramid take compared to the original image? Source: S. Seitz

Gaussian Pyramid

Questions?