1 / 30

Lecture 3: Edge detection, continued

CS4670: Computer Vision. Noah Snavely. Lecture 3: Edge detection, continued. Announcements. Project 1 (tentatively) assigned this Friday, 9/3 Part 1 due one week later Part 2 (using the cameraphone) due shortly after Guest lectures next week. Images as vectors. Very important idea!. 1.

leatrix
Download Presentation

Lecture 3: Edge detection, continued

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS4670: Computer Vision Noah Snavely Lecture 3: Edge detection, continued

  2. Announcements • Project 1 (tentatively) assigned this Friday, 9/3 • Part 1 due one week later • Part 2 (using the cameraphone) due shortly after • Guest lectures next week

  3. Images as vectors • Very important idea! 1 0 Scanline (1D signal) 2D image (A 2D, n x m image can be represented by a vector of length nm formed by concatenating the rows) Vector

  4. Filtering revisited • Linear filtering: each pixel replaced with a linear combination of neighboring intensities • Can be represented by matrix multiplication • If we interpret an image as a vector • Matrix is really big…

  5. Multiplying row and column vectors = ?

  6. Example What kind of filter is this?

  7. Fun with Matlab…

  8. Edge detection • Convert a 2D image into a set of curves • Extracts salient features of the scene • More compact than pixels TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA

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

  10. Derivative of Gaussian filter y-direction x-direction

  11. The Sobel operator Common approximation of derivative of Gaussian • 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 value

  12. Sobel operator: example Source: Wikipedia

  13. Example • original image (Lena)

  14. Finding edges gradient magnitude

  15. Finding edges where is the edge? thresholding

  16. Non-maximum supression • Check if pixel is local maximum along gradient direction • requires interpolating pixels p and r

  17. Finding edges thresholding

  18. Finding edges thinning (non-maximum suppression)

  19. Canny edge detector MATLAB: edge(image,‘canny’) • Filter image with derivative of Gaussian • Find magnitude and orientation of gradient • Non-maximum suppression • Linking and thresholding (hysteresis): • Define two thresholds: low and high • Use the high threshold to start edge curves and the low threshold to continue them Source: D. Lowe, L. Fei-Fei

  20. Canny edge detector • Still one of the most widely used edge detectors in computer vision • Depends on several parameters: J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986. : width of the Gaussian blur high threshold low threshold

  21. Canny edge detector original Canny with Canny with • The choice of depends on desired behavior • large detects “large-scale” edges • small detects fine edges Source: S. Seitz

  22. first derivative peaks Scale space (Witkin 83) • Properties of scale space (w/ Gaussian smoothing) • edge position may shift with increasing scale () • two edges may merge with increasing scale • an edge may not split into two with increasing scale larger Gaussian filtered signal

  23. Questions?

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

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

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

  27. Image sub-sampling Source: F. Durand

  28. Even worse for synthetic images Source: L. Zhang

  29. 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

  30. Wagon-wheel effect (See http://www.michaelbach.de/ot/mot_wagonWheel/index.html) Source: L. Zhang

More Related