1 / 27

Noise Filtering & Edge Detection

Noise Filtering & Edge Detection. Jeremy Wyatt. Filtering. Last time we saw that we could detect edges by calculating the intensity change (gradient) across the image We saw that we could implement this using the idea of filtering. Linear filtering: the algorithm. for i=2:image_height-1

Download Presentation

Noise Filtering & Edge Detection

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. Noise Filtering & Edge Detection Jeremy Wyatt

  2. Filtering • Last time we saw that we could detect edges by calculating the intensity change (gradient) across the image • We saw that we could implement this using the idea of filtering

  3. Linear filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x x+2 j y+2 i i+y NB We count from the upper left,and in MATLAB we start at 1

  4. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  5. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  6. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  7. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  8. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  9. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  10. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  11. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  12. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=2 i+y

  13. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=3 x+2 y+2 i=2 i+y

  14. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=4 x+2 y+2 i=2 i+y

  15. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=5 x+2 y+2 i=2 i+y

  16. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=2 x+2 y+2 i=3 i+y

  17. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=3 x+2 y+2 i=3 i+y

  18. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=4 x+2 y+2 i=3 i+y

  19. Linear Filtering: the algorithm for i=2:image_height-1 for j=2:image_width-1 end end j+x j=5 x+2 y+2 i=3 i+y

  20. Noise filtering • We can use convolution to remove noise as we mentioned, e.g. mean filter • This is a linear filter • The most widely used is Gaussian filtering

  21. Effect of mean filtering Original 3x3 filter 5x5 filter

  22. Horizontal Sobel operator Abs(Gx) Threshold=30 5x5 Mean Filter Horizontal Sobel operator Abs(Gx) Threshold=30

  23. Effect of Gaussian filtering Original 5x5 filter Horizontal Sobel Operator Abs(Gx) Threshold = 30

  24. Sequenced filters We can replace a 2d Gaussian filter with 2, 1d Gaussian filters in sequence

  25. Gaussian edge detection • We can take the first derivative of the masks and then convolve with those • Then we can combine the resulting images using the formula for magnitude • However when thresholded we can see that this loses edge information • How can we keep this?

  26. Second order operators • Thresholding the first derivative of the smoothed signal thickens the edges and also we lose some useful edges • One solution is therefore to take the second derivative instead • A basic second order mask is the Laplacian

  27. Reading • RC Jain, Chapter 4

More Related