1 / 38

SYDE 575: Introduction to Image Processing

Image Enhancement by Smoothing Textbook Sections 3.4 – 3.5, 5.3.1-5.3.2. SYDE 575: Introduction to Image Processing. Noise Reduction by Image Averaging. We want to be able to reduce the amount of noise in an image Assume that the noise process has a mean of zero

Download Presentation

SYDE 575: Introduction to Image Processing

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. Image Enhancement by Smoothing Textbook Sections 3.4 – 3.5, 5.3.1-5.3.2 SYDE 575: Introduction to Image Processing

  2. Noise Reduction by Image Averaging • We want to be able to reduce the amount of noise in an image • Assume that the noise process has a mean of zero • One approach is to take many images f(x,y) of the same scene and use these to generate a noise-free image g(x,y)

  3. Noise Reduction by Image Averaging • Assume noise is additive and Gaussian distributed with zero mean • Suppose we take the average of q number of noise samples at a point in the image

  4. Noise Reduction by Image Averaging • Now, apply concept to each pixel in the whole image • Given an infinite number of noise samples, the average approaches the mean of the distribution, which in this case is 0

  5. Example Source: Gonzalez and Woods

  6. Noise Reduction by Spatial Filtering • Image averaging takes advantage of information redundancy from the individual images to reduce noise • Not always possible to acquire so many images! • Images may not be perfectly registered so errors due to spatial misalignment • Alternative option: Take advantage of information redundancy from different pixels within the same image to reduce noise

  7. Spatial Filtering - Convolution • 2D discrete convolution output input point spread function (2d) or impulse response (1d) • Impulse response h[m,n] can be viewed as a spatial filter for an input image f[m,n] to produce output image g[m,n]

  8. Spatial Filtering • Let us represent w(x,y) as a 2D convolution mask Source: Gonzalez and Woods

  9. Spatial Filtering • Spatial filtering of an image f with 2D convolution using symmetrical mask w of size m x n can be expressed as output convolution mask; the “system” input

  10. Spatial Filtering Source: Gonzalez and Woods

  11. Local Average Filter for Smoothing • Instead of averaging between images, we can average neighboring pixels using the following point spread function (PSF) • Recall similar 1-d mask [1/3 1/3 1/3] • Why is the 1/9 required?

  12. Averaging Filter • Removes noise but also blurs Source: Gonzalez and Woods

  13. Properties of Averaging Filter • Linear? • Shift Invariant? • Memory? • Causal? • Stable? • Invertible?

  14. Weighted Average Filter • Problem: Simple averaging of neighboring pixels lead to over-smoothing • Possible solution: Instead of weighting all neighboring pixels equally, assign higher weights to pixels that are closer to the input pixel

  15. Weighted Averaging Filter: Example Source: Gonzalez and Woods

  16. Weighted Averaging Filter: Example Average Weighted Average Noisy

  17. Gaussian Smoothing • A weighted average can be produced using a Gaussian as a weight • In 1d • In 2d

  18. 1D Gaussian Source: Wikipedia

  19. 2d Gaussian Source: Wikipedia

  20. Characteristics of Local Averaging • h(m,n) >= 0 for all (m,n) • S h(m,n) = 1 (DC gain is 1) • Non-causal • Typically odd-dimensions (practical) • Even symmetry

  21. Order-Statistic Filters • Nonlinear spatial filters, i.e., a1f1 (m,n) + a2f2 (m,n) ≠ a1g1 (m,n) + a2g2 (m,n) • Best known example: median filter

  22. Median Filter • Provides good noise reduction for certain types of noise such as impulse noise • Considerably less blurring than weighted averaging filter • Forces a pixel to be like its neighbors • Steps • Order pixels within an area • Replace value of center pixel with median value (half of all pixels have intensities greater than or equal to the median value)

  23. Median Filter: Example 255 10 9 255 10 9 10 255 10 10 10 10 8 10 10 8 10 10 8 9 10 10 10 10 10 255 255 median=10

  24. Median Filter: Example Source: Gonzalez and Woods

  25. S-statistic Filter • Another method to avoid impact of outliers on smoothing is the S-statistic filter • Basically, only use those values within a region that are within a certain range relative to the mean • Typically, this is done by calculating the m and s of the local region and determining a local average based only on pixels within a certain number of s

  26. Recap: Spatial smoothing filters • All of the filters discussed so far are spatial smoothing filters • Weight of each pixel in the neighborhood covered by the filter depends on the proximity of the pixel to the center pixel being filtered • Typically, the closer the pixel is to the center pixel, the higher the weight

  27. Range Smoothing Filters • Problem: oversmoothing of edges and other fine image detail using ideal and Gaussian filters • Alternative solution: range smoothing filters • Weight of each pixel in the neighborhood covered by the filter depends on the similarity of the pixel's intensity value to that of the center pixel being filtered • The closer the pixel's intensity value is to that of the center pixel, the higher the weight

  28. Bilateral Filtering • Problem: range smoothing filter simply remaps intensity values • No notion of space • Poor noise reduction performance (in fact, not really useful by itself) • Idea: Combine spatial smoothing filters with range smoothing filters! • Good noise reduction (Spatial smoothing) • Good edge and detail preservation (Range smoothing)

  29. Bilateral Filtering • Resulting filter is non-linear Range smoothing filter Spatial smoothing filter

  30. Example • Suppose we use Gaussian models for the range and spatial smoothing filters Source: Tomasi et al. 1998

  31. Uses: Noise Suppression noisy Gaussian spatial filter Bilateral filter

  32. Uses: Special Effects • Bilateral filter reduces small image details while preserving large edge details • What would happen if we apply bilateral filtering multiple times? • More and more smaller details get smoothed out • Large edges remain well-preserved • Result: cartoon-like image

  33. Uses: Special Effects original 5 iterations

  34. Implementing Symmetrical 2-D Filters • Large images in use today (e.g., 1k x 1k, 5k x 5k, and even larger) require increased computational requirements • Symmetrical filters are commonly used in image processing systems • There is a faster way to implement a 2-d symmetrical mask using 2 1-d arrays

  35. Example: 2d as 2 x 1d * 1/9 Smoothing Mask – Note Symmetry “Image”

  36. Representing 2d Mask as 2 x 1d 1/9 = 1/3 * 1/3

  37. Top row and bottom row are equivalent 1/9 * = 1/9 1/3 * 1/3 * = same

  38. Computational Complexity • Assume M by N image and m by n filter mask • For 2d mask, number of multiplications is: M x N x m x n • For 2 1d masks, number of multiplication is M x N x (m + n) • So, for a 15 by 15 mask, 2d implementation is 225MN and 1d implementation is 30MN • Huge Savings! But note that 1d implementation requires storing an additional image in memory

More Related