convolution and edge detection
Download
Skip this Video
Download Presentation
Convolution and Edge Detection

Loading in 2 Seconds...

play fullscreen
1 / 23

Convolution and Edge Detection - PowerPoint PPT Presentation


  • 242 Views
  • Uploaded on

Convolution and Edge Detection. 15-463: Computational Photography Alexei Efros, CMU, Fall 2005. Some slides from Steve Seitz. Fourier spectrum . Fun and games with spectra. Gaussian filtering. A Gaussian kernel gives less weight to pixels further from the center of the window

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Convolution and Edge Detection' - knoton


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
convolution and edge detection
Convolution and Edge Detection

15-463: Computational Photography

Alexei Efros, CMU, Fall 2005

Some slides from Steve Seitz

gaussian filtering
Gaussian filtering
  • A Gaussian kernel gives less weight to pixels further from the center of the window
  • This kernel is an approximation of a Gaussian function:
convolution
Convolution
  • Remember cross-correlation:
  • A convolution operation is a cross-correlation where the filter is flipped both horizontally and vertically before being applied to the image:
  • It is written:
  • Suppose H is a Gaussian or mean kernel. How does convolution differ from cross-correlation?
the convolution theorem
The greatest thing since sliced (banana) bread!

The Fourier transform of the convolution of two functions is the product of their Fourier transforms

The inverse Fourier transform of the product of two Fourier transforms is the convolution of the two inverse Fourier transforms

Convolution in spatial domain is equivalent to multiplication in frequency domain!

The Convolution Theorem
2d convolution theorem example
2D convolution theorem example

|F(sx,sy)|

f(x,y)

*

h(x,y)

|H(sx,sy)|

g(x,y)

|G(sx,sy)|

image gradient

The gradient direction is given by:

    • how does this relate to the direction of the edge?
  • The edge strength is given by the gradient magnitude
Image gradient
  • The gradient of an image:
  • The gradient points in the direction of most rapid change in intensity
effects of noise
Effects of noise
  • Consider a single row or column of the image
    • Plotting intensity as a function of position gives a signal

How to compute a derivative?

  • Where is the edge?
derivative theorem of convolution
Derivative theorem of convolution
  • This saves us one operation:
laplacian of gaussian
Laplacian of Gaussian
  • Consider

Laplacian of Gaussian

operator

  • Where is the edge?
  • Zero-crossings of bottom graph
2d edge detection filters

Laplacian of Gaussian

  • is the Laplacian operator:
2D edge detection filters

Gaussian

derivative of Gaussian

matlab demo
MATLAB demo

g = fspecial(\'gaussian\',15,2);

imagesc(g)

surfl(g)

gclown = conv2(clown,g,\'same\');

imagesc(conv2(clown,[-1 1],\'same\'));

imagesc(conv2(gclown,[-1 1],\'same\'));

dx = conv2(g,[-1 1],\'same\');

imagesc(conv2(clown,dx,\'same\');

lg = fspecial(\'log\',15,2);

lclown = conv2(clown,lg,\'same\');

imagesc(lclown)

imagesc(clown + .2*lclown)

what does blurring take away1
What does blurring take away?

smoothed (5x5 Gaussian)

edge detection by subtraction
Edge detection by subtraction

Why does

this work?

smoothed – original

gaussian image filter
Gaussian - image filter

FFT

Gaussian

delta function

Laplacian of Gaussian

ad