1 / 39

Lecture # 19 Image Processing II

Lecture # 19 Image Processing II. Image Processing II. 2 Classes of Digital Filters. Global filters transform each pixel uniformly according to the function regardless of its location in the image Local filters transform a pixel depending upon its relation to surrounding ones.

tessa
Download Presentation

Lecture # 19 Image Processing II

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. Lecture # 19 Image Processing II

  2. Image Processing II

  3. 2 Classes of Digital Filters • Global filters transform each pixel uniformly according to the function regardless of its location in the image • Local filters transform a pixel depending upon its relation to surrounding ones

  4. Global Filters: REVIEW • Brightness and Contrast control • Histogram thresholding • Histogram stretching or equalization • Color corrections • Inversions

  5. Local Filters • Blurring • Sharpening • Unsharp Masking • Edge and line detection • Noise filters

  6. Blurring Algorithm For (every pixel in column x) { For (every pixel in row y of column x) { average image[x,y] with it’s neighbors; } }

  7. 1 1 1 1 1 1 1 1 1 Blurring • Average each pixel with its neighbors by: multiplying each pixel and its neighbors by 1: = - add multiplied pixels and divide by 9 - store result in a new array • The new array contains a blurred image.

  8. Gaussian Blur Multiply neighbors by less than middle

  9. Blur Demo • Photoshop • Filter->Blur->Blur • Filter->Blur->Gaussian Blur

  10. Local Filters • Blurring • Sharpening • Unsharp Masking • Edge and line detection • Noise filters

  11. Sharpening • Subtract neighboring pixels by: multiplying each pixel and its neighbors by: = - add multiplied pixels - store result in a new array • The new array contains a sharpened image. 0 -1 0 -1 +5 -1 -1 0 0

  12. Unsharp Masking • Unsharp masking also sharpens an image • The Algorithm: 1. call the original (unblurred) image A 2. blur the image (call it B) 3. subtract B from the unblurred image (let C = A-B) 4. Multiply C by some number, k (k > 1) 5. Sharpened Image = A + kC

  13. Sharpen/Unsharp mask • Photoshop • Filter->Sharpen->Sharpen • Filter->Sharpen->Unsharp mask

  14. Local Filters • Blurring • Sharpening • Unsharp Masking • Edge and line detection • Noise filters

  15. +1 -1 0 -1 +1 0 -1 +1 0 Edge and Line Detection • Multiply each pixel and its neighbors by the following corresponding patterns (numbers) - add results - clip to 255 - result = “Edge” image -1 -1 -1 0 0 0 +1 +1 +1 Gets Gets Vertical Edges Horizontal Edges

  16. Edge Detection • edge detection is often used to recognized objects of interest in the image

  17. Edge Detection • Photoshop • Filter->Stylize->Find Edges

  18. Local Filters • Blurring • Sharpening • Unsharp Masking • Edge and line detection • Noise filters

  19. Noise Filters • A median filter takes away “salt & pepper” noise (speckles)

  20. Noise Filter • Photoshop • Filter->Noise->Median Filter

  21. 0 -1 0 -1 +5 -1 1 1 1 1 1 1 1 +1 -1 0 -1 0 0 1 -1 +1 0 1 -1 +1 0 Kernel Filtering Edges Blur Sharpen -1 -1 -1 Apply same algorithm at every pixel using different kernel values 0 0 0 +1 +1 +1

  22. ImageEditing

  23. Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

  24. Selection Tools Tool Bar • Lasso Tool - manually draw outline (free hand) - manually outline (line segments) - magnetic lasso (semi-automated) • Magic Wand DEMOS

  25. Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

  26. Painting Tools • Airbrush Tool • Paint Bucket Tool • Paintbrush Tool • Pencil Tool DEMOS

  27. Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

  28. Cut & Paste • Word Processors - cut & paste strings of characters (1D arrays) • Image Editing - cut & paste pixels (2D arrays) - replace old pixels with new pixels

  29. Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

  30. Cloning • Copy pixels from one part of an image - to another part of an image ... Interactively DEMO

  31. Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

  32. Layers and Blending Can create arbitrary number of layers for - animation - special effects in movies - morphing Layer n Layer 2 Layer 1

  33. Blending • The idea: Blended image = .3 x + .7 x is a weighted combination (sum) of two or more other images.

  34. Example Blend .3 x +.7 x = Bearastronaut

  35. Masking • The idea: Create another image where the value of pixels is the weighting term for a blend operation:

  36. Summary • Digital Images and pixels • Digitize a picture by • Sampling • Quantization • Color Models • RGB, CMYK, and HSB • Storage Formats • .gif, .jpg, .png, .bmp

  37. Summary • Global Filters • Contrast & Brightness Control • Thresholding • Histogram stretching & equalization • Color corrections • Inversion

  38. Summary • Local filters • Blurring • Sharpening • Unsharp Masking • Edge and line detection • Noise filters

  39. Summary • Image Editing • Selection Tools • Painting Tools • Cut & Paste • Cloning • Layers and Blending

More Related