1 / 24

Digital Image Processing

Digital Image Processing. Image Enhancement Part IV. Nonlinear Filtering. Nonlinear Filters Cannot be expressed as convolution Cannot be expressed as frequency shaping “Nonlinear” Means Everything (other than linear) Need to be more specific Often heuristic

cain-gibson
Download Presentation

Digital 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. Digital Image Processing Image Enhancement Part IV

  2. Nonlinear Filtering • Nonlinear Filters • Cannot be expressed as convolution • Cannot be expressed as frequency shaping • “Nonlinear” Means Everything (other than linear) • Need to be more specific • Often heuristic • We will study some “nice” ones

  3. Impulsive (Salt & Pepper) Noise • Definition • Each pixel in an image has a probability pa or pb of being contaminated by a white dot (salt) or a black dot (pepper) X: noise-free image, Y: noisy image with probability pa noisy pixels with probability pb clean pixels with probability 1 - pa - pb add salt & pepper noise

  4. Order-Statistics Filters • nonlinear spatial filters • response is based on ordering (ranking) the pixels contained in the image area encompassed by the filter • replacing of the center pixel with the value determined by the ranking result

  5. Median Filtering • Median filter • replaces the pixel value by the median value in the neighborhood • The principal function is to force distinct gray level points to be more like their neighbors. • excellent noise-reduction capabilities with less blurring than linear smoothing filters • effective for impulse noise (salt-and-pepper noise) • Min: Set the pixel value to the minimum in the neighbourhood • Max: Set the pixel value to the maximum in the neighbourhood cf.) max filter → R = max {zk | k = 1,2,…,9} min filter → R = min {zk | k = 1,2,…,9}

  6. Order-Statistics Filters • Given a set of numbers • Denote the OS as • such that • Applying Median Filters • to Images • Use sliding windows • (similar to spatial linear filters) • Typical windows: • 3x3, 5x5, 7x7, other shapes …… max value min value middle value

  7. Median Filters original noisy (pa = pb = 0.1) median filtered 3x3 window median filtered 5x5 window From MATLAB sample images

  8. Iterative Median Filters • Idea: repeatedly apply median filters 1 time 2 times 3 times From [Gonzalez & Woods]

  9. Switching Median Filters • Motivation • Regular median filters change both “bad” and “good” pixels • Idea • Detect/classify “bad” and “good” pixels • Filter “bad” pixels only From [Wang & Zhang]

  10. Switching Median Filters original noisy (pa = pb = 0.1) regular 5x5 median filtered switching 5x5 median filtered From MATLAB sample images

  11. Order Statistics (OS) Filters • Recall Order Statistics: • For • OS • such that • OS filter: General Form • Special Cases where (M+1)-th

  12. Order Statistics (OS) Filters • Note: An OS Filter is Uniquely Defined by {wi} • Example 1: • Example 2: M-th (M+1)-th (M+2)-th then then

  13. Examples • A 4x4 grayscale image is given by impulse? impulse? • Filter the image with a 3x3 median filter, after zero-paddingat the image borders median filtering zero-padding

  14. Examples • Filter the image with a 3x3 median filter, after replicate-padding at the image borders median filtering replicate -padding impulse cleaned!

  15. Examples • Filter the image with a 3x3 OS filter, after replicate-padding at the image borders. The weighting factors of the OS filter are given by {wi | i = 1, …, 9} = {0, 0, 0, ¼, ½, ¼, 0, 0, 0} OS filtering replicate -padding

  16. Gradient • the term gradient is used for a gradual blend of colour which can be considered as an even gradation from low to high values • At each image point, the gradient vector points in the direction of largest possible intensity increase, • the length of the gradient vector corresponds to the rate of change in that direction. • Two types of gradients, with blue arrows to indicate the direction of the gradient

  17. Sobel operators • Represents a rather inaccurate approximation of the image gradient • The operator calculates the gradient of the image intensity at each point • Giving the direction of the largest possible increase from light to dark and the rate of change in that direction • The result therefore shows how "abruptly" or "smoothly" the image changes at that point

  18. Sobel Example

  19. Sobel Example Grayscale image of a brick wall & a bike rack scale image of a brick wall & a bike rack

  20. Combining Spatial Enhancement Methods • Successful image enhancement is typically not achieved using a single operation • Rather we combine a range of techniques in order to achieve a final result • This example will focus on enhancing the bone scan to the right

  21. (a) Laplacian filter of bone scan (a) (b) Sharpened version of bone scan achieved by subtracting (a) and (b) (c) Sobel filter of bone scan (a) (d) Combining Spatial Enhancement Methods

  22. (h) Result of applying a power-law trans. to (g) Sharpened image which is sum of (a) and (f) (g) The product of (c) and (e) which will be used as a mask (f) (e) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Image (d) smoothed with a 5*5 averaging filter Combining Spatial Enhancement Methods

  23. Compare the original and final images Images taken from Gonzalez & Woods, Digital Image Processing (2002) Combining Spatial Enhancement Methods

  24. assignments • Chapter 3 • 1, 6, 10, 12, 18, 22, 23.

More Related