1 / 31

CS 440 / ECE 448 Introduction to Artificial Intelligence Fall 2006

CS 440 / ECE 448 Introduction to Artificial Intelligence Fall 2006. Instructor: Eyal Amir TAs: Deepak Ramachandran (head TA), Jaesik Choi. Today: Computer Vision. Vision tasks Given an image or a set of images formed by a camera or another sensor (e.g., laser) Identify objects

Download Presentation

CS 440 / ECE 448 Introduction to Artificial Intelligence Fall 2006

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. CS 440 / ECE 448Introduction to Artificial IntelligenceFall 2006 Instructor: Eyal Amir TAs: Deepak Ramachandran (head TA), Jaesik Choi CS440 / ECE 448 – Fall 2006 Lecture #2

  2. Today: Computer Vision • Vision tasks • Given an image or a set of images formed by a camera or another sensor (e.g., laser) • Identify objects • Identify scene • Identify actions • Localize the above • Vision seems deceptively easy CS440 / ECE 448 – Fall 2006 Lecture #2

  3. Human/Felix Bug Barbara Steele Face Joe Camel Problem: Recognizing instances Recognizing categories CS440 / ECE 448 – Fall 2006 Lecture #2

  4. CS440 / ECE 448 – Fall 2006 Lecture #2

  5. Variability: Camera position Illumination Internal parameters Within-class variations CS440 / ECE 448 – Fall 2006 Lecture #2

  6. Object Recognition • How to detect the class of object and its identity mechanically? • Canonical, invariant representation? Eliminate most of the parameters that govern appearance? • Work with the raw pixels? • How do we use prior knowledge about the domain? • Scale, location, possible objects, texture CS440 / ECE 448 – Fall 2006 Lecture #2

  7. Processing an Image Image: array of pixels Localizing Transformation to real-world, 3D coordinates Features: lines, shapes, invariants, colors, positions, histograms matching against prototype/class Segmentation, aggregation CS440 / ECE 448 – Fall 2006 Lecture #2

  8. Today: Detecting Features Image: array of pixels Features: lines, shapes, invariants, colors, positions, histograms matching against prototype/class Segmentation, aggregation CS440 / ECE 448 – Fall 2006 Lecture #2

  9. Detecting Local Features • Slide a window over the image • Detect • Line • Edge / Edgel • Corners • Direction of the above CS440 / ECE 448 – Fall 2006 Lecture #2

  10. Edge detection • Convert a 2D image into a set of curves • Extracts salient features of the scene • More compact than pixels CS440 / ECE 448 – Fall 2006 Lecture #2

  11. Edge is Where Change Occurs • Change is measured by derivative in 1D • Biggest change, derivative has maximum magnitude • Or 2nd derivative is zero. CS440 / ECE 448 – Fall 2006 Lecture #2

  12. 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 CS440 / ECE 448 – Fall 2006 Lecture #2

  13. The discrete gradient • How can we differentiate a digital image f[x,y]? • take discrete derivative (finite difference) • How would you implement this as a cross-correlation? CS440 / ECE 448 – Fall 2006 Lecture #2

  14. The Sobel operator • Better approximations of the derivatives • The Sobel operators below are very commonly used • 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, however CS440 / ECE 448 – Fall 2006 Lecture #2

  15. Gradient operators (a): Roberts’ cross operator (b): 3x3 Prewitt operator (c): Sobel operator (d) 4x4 Prewitt operator CS440 / ECE 448 – Fall 2006 Lecture #2

  16. 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? CS440 / ECE 448 – Fall 2006 Lecture #2

  17. Peaks in Solution: smooth first Where is the edge? CS440 / ECE 448 – Fall 2006 Lecture #2

  18. Derivative theorem of convolution • This saves us one operation: CS440 / ECE 448 – Fall 2006 Lecture #2

  19. Laplacian of Gaussian Laplacian of Gaussian operator • Where is the edge? • Zero-crossings of bottom graph CS440 / ECE 448 – Fall 2006 Lecture #2

  20. 2D edge detection filters • is the Laplacian operator: Laplacian of Gaussian Gaussian derivative of Gaussian CS440 / ECE 448 – Fall 2006 Lecture #2

  21. Exercise • Write an algorithm for detecting edges • Congratulations! You now know how to detect edges in computer images! • … what now? • A little more edge detection • Detecting lines and other shapes from edges CS440 / ECE 448 – Fall 2006 Lecture #2

  22. Optimal Edge Detection: Canny • Assume: • Linear filtering • Additive iid Gaussian noise • Edge detector should have: • Good Detection. Filter responds to edge, not noise. • Good Localization: detected edge near true edge. • Single Response: one per edge. CS440 / ECE 448 – Fall 2006 Lecture #2

  23. Optimal Edge Detection: Canny (continued) • Optimal Detector is approximately Derivative of Gaussian. • Detection/Localization trade-off • More smoothing improves detection • And hurts localization. • This is what you might guess from (detect change) + (remove noise) CS440 / ECE 448 – Fall 2006 Lecture #2

  24. The Canny edge detector • original image CS440 / ECE 448 – Fall 2006 Lecture #2

  25. The Canny edge detector • norm of the gradient CS440 / ECE 448 – Fall 2006 Lecture #2

  26. The Canny edge detector • thresholding CS440 / ECE 448 – Fall 2006 Lecture #2

  27. The Canny edge detector • Thinning (non-maximum suppression) CS440 / ECE 448 – Fall 2006 Lecture #2

  28. Non-maximum suppression • Check if pixel is local maximum along gradient direction • requires checking interpolated pixels p and r CS440 / ECE 448 – Fall 2006 Lecture #2

  29. Predicting the next edge point Assume the marked point is an edge point. Then we construct the tangent to the edge curve (which is normal to the gradient at that point) and use this to predict the next points (here either r or s). CS440 / ECE 448 – Fall 2006 Lecture #2 (Forsyth & Ponce)

  30. Hysteresis • Check that maximum value of gradient value is sufficiently large • drop-outs? use hysteresis • use a high threshold to start edge curves and a low threshold to continue them. CS440 / ECE 448 – Fall 2006 Lecture #2

  31. Effect of  (Gaussian kernel size) original Canny with Canny with • The choice of depends on desired behavior • large detects large scale edges • small detects fine features CS440 / ECE 448 – Fall 2006 Lecture #2

More Related