1 / 39

Comprehensive Image Processing Techniques: Computer Vision Lecture

Discover image processing as a function in Computer Vision Lecture #3, including point operations, convolution, Gaussian smoothing, and more. Learn about image processing techniques using Fourier Transform and convolution kernels.

bookers
Download Presentation

Comprehensive Image Processing Techniques: Computer Vision Lecture

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. Computer Vision Spring 2012 15-385,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am

  2. Image Processing and Filtering Lecture #3

  3. Image as a Function • We can think of an image as a function, f, • f:R2R • f (x, y)gives the intensity at position (x, y) • Realistically, we expect the image only to be defined over a rectangle, with a finite range: • f: [a,b]x[c,d]  [0,1] • A color image is just three functions pasted together. We can write this as a “vector-valued” function:

  4. Image as a Function

  5. Image Processing • Define a new image g in terms of an existing image f • We can transform either the domain or the range of f • Range transformation: What kinds of operations can this perform?

  6. Point Operations

  7. Point Processing Nonlinear Lower Contrast Original Darken Lower Contrast Nonlinear Raise Contrast Invert Lighten Raise Contrast

  8. Point Processing x + 128 x - 128 255 - x x / 2 x * 2 x ((x / 255.0) ^ 0.33) * 255.0 ((x / 255.0) ^2) * 255.0 Nonlinear Lower Contrast Original Darken Lower Contrast Nonlinear Raise Contrast Invert Lighten Raise Contrast

  9. Neighborhood Operations

  10. Neighborhood operations Image Edge detection Blur

  11. Image Processing • Some operations preserve the range but change the domain of f : What kinds of operations can this perform? • Still other operations operate on both the domain and the range of f .

  12. Face Morphing

  13. Linear Shift Invariant Systems (LSIS) Linearity: Shift invariance:

  14. LSIS Example of LSIS Defocused image ( g ) is a processed version of the focused image ( f ) Ideal lens is a LSIS Linearity: Brightness variation Shift invariance: Scene movement (not valid for lenses with non-linear distortions)

  15. Convolution LSIS is doing convolution; convolution is linear and shift invariant kernel h

  16. Convolution - Example Eric Weinstein’s Math World

  17. Convolution - Example 1 1 -1 1 -1 1 1 -2 -1 1 2

  18. Convolution Kernel – Impulse Response • What h will give us g = f ? Dirac Delta Function (Unit Impulse) Sifting property:

  19. Optical System point source point spread function • However, optical systems are never ideal. • Point spread function of Human Eyes Point Spread Function Optical System scene image • Ideally, the optical system should be a Dirac delta function.

  20. Point Spread Function normal vision myopia hyperopia astigmatism Images by Richmond Eye Associates

  21. Cascade system Properties of Convolution • Commutative • Associative

  22. Convolution Fourier Transform Inverse Fourier Transform Images are Discrete and Finite

  23. For n=2, convolve pixel values with 2D images: 2 1 1 1 1 then (a) use or (b) use 1 1 1 2 2 2 1 1 1 2 2 2 2 4 1 1 1 2 1 Averaging Let’s think about averaging pixel values Which is faster?

  24. Averaging large Repeated averaging Gaussian smoothing The convolution kernel

  25. pixels Filter size …can be very large 2D Gaussian is separable! Gaussian Smoothing Gaussian kernel (truncate, if necessary) Use two 1D Gaussian filters

  26. Gaussian Smoothing • A Gaussian kernel gives less weight to pixels further from the center of the window (5x5, sigma=0.5) 0.0000 0.0000 0.0002 0.0000 0.0000 0.0000 0.0113 0.0837 0.0113 0.0000 0.0002 0.0837 0.6187 0.0837 0.0002 0.0000 0.0113 0.0837 0.0113 0.0000 0.0000 0.0000 0.0002 0.0000 0.0000 • This kernel is an approximation of a Gaussian function:

  27. Gaussian Smoothing original

  28. Mean vs. Gaussian filtering

  29. Gaussian Smoothing by Charles Allen Gillbert by Harmon & Julesz http://www.michaelbach.de/ot/cog_blureffects/index.html

  30. Gaussian Smoothing http://www.michaelbach.de/ot/cog_blureffects/index.html

  31. Border Problem

  32. Border Problem • Ignore • Output image will be smaller than original • Pad with constant values • Can introduce substantial 1st order derivative values • Pad with reflection • Can introduce substantial 2nd order derivative values

  33. Median filtering sort median Median Filter (a) • Smoothing is averaging (a) Blurs edges (b) Sensitive to outliers (b) • Sort values around the pixel • Select middle value (median) • Non-linear (Cannot be implemented with convolution)

  34. Gaussian noise Salt and pepper noise 3x3 5x5 7x7

  35. Minimize • Maximize Correlation template How do we locate the template in the image? Cross-correlation

  36. Problem: A C B t f We need to be the maximum! Cross-correlation Note: Auto-correlation

  37. Normalized Correlation • Account for energy differences

  38. Announcements • Project 1 will be out later this evening. • WARNING! Start projects early.

  39. Next Class • Image Processing and Filtering (continued) • Fourier or frequency domain analysis • Horn, Chapter 6

More Related