1 / 21

CS559: Computer Graphics

CS559: Computer Graphics. Lecture 6: Painterly Rendering and Edges Li Zhang Spring 2010. Another type of painterly rendering. Line Drawing. http://www.cs.rutgers.edu/~decarlo/abstract.html. Another type of painterly rendering. Line Drawing.

Download Presentation

CS559: Computer Graphics

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. CS559: Computer Graphics Lecture 6: Painterly Rendering and Edges Li Zhang Spring 2010

  2. Another type of painterly rendering • Line Drawing http://www.cs.rutgers.edu/~decarlo/abstract.html

  3. Another type of painterly rendering • Line Drawing http://www.cs.rutgers.edu/~decarlo/abstract.html

  4. Another type of painterly rendering • Line Drawing http://www.cs.rutgers.edu/~decarlo/abstract.html

  5. Another type of painterly rendering • Line Drawing http://www.cs.rutgers.edu/~decarlo/abstract.html

  6. Edge Detection • Convert a 2D image into a set of curves • Extracts salient features of the scene

  7. Edge detection • One of the most important uses of image processing is edge detection: • Really easy for humans • Not that easy for computers • Fundamental in computer vision • Important in many graphics applications

  8. What is an edge? • Q: How might you detect an edge in 1D?

  9. Gradients • The gradient is the 2D equivalent of the derivative: • Properties of the gradient • It’s a vector • Points in the direction of maximum increase of f • Magnitude is rate of increase • How can we approximate the gradient in a discrete image? gx[i,j] = f[i+1,j] – f[i,j] and gy[i,j]=f[i,j+1]-f[i,j] Can write as mask [-1 1] and [1 –1]’

  10. Less than ideal edges

  11. Results of Sobel edge detection

  12. Edge enhancement • A popular gradient magnitude computation is the Sobel operator: • We can then compute the magnitude of the vector (sx, sy).

  13. Results of Sobel edge detection

  14. Results of Sobel edge detection

  15. Non-maximum Suppression • Check if pixel is local maximum along gradient direction • requires checking interpolated pixels p and r The Canny Edge Detector

  16. Steps in edge detection • Edge detection algorithms typically proceed in three or four steps: • Filtering: cut down on noise • Enhancement: amplify the difference between edges and non-edges • Detection: use a threshold operation • Localization (optional): estimate geometry of edges, which generally pass between pixels

  17. The Canny Edge Detector original image (Lena)

  18. The Canny Edge Detector magnitude of the gradient

  19. The Canny Edge Detector After non-maximum suppression

  20. Canny Edge Detector original Canny with Canny with : Gaussian filter parameter • The choice of depends on desired behavior • large detects large scale edges • small detects fine features

More Related