1 / 59

Applications of Image Filters

02/04/10. Applications of Image Filters. Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem. Review: Image filtering. 1. 1. 1. 1. 1. 1. 1. 1. 1. Credit: S. Seitz. Image filtering. 1. 1. 1. 1. 1. 1. 1. 1. 1. Credit: S. Seitz. Image filtering. 1. 1. 1.

welcht
Download Presentation

Applications of Image Filters

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. 02/04/10 Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem

  2. Review: Image filtering 1 1 1 1 1 1 1 1 1 Credit: S. Seitz

  3. Image filtering 1 1 1 1 1 1 1 1 1 Credit: S. Seitz

  4. Image filtering 1 1 1 1 1 1 1 1 1 Credit: S. Seitz

  5. Filtering in spatial domain 1 0 -1 2 0 -2 1 0 -1 * =

  6. Filtering in frequency domain FFT FFT = Inverse FFT

  7. Sharpening revisited = detail smoothed (5x5) original Let’s add it back: + α = original detail sharpened • What does blurring take away? –

  8. Application: Hybrid Images • A. Oliva, A. Torralba, P.G. Schyns, “Hybrid Images,” SIGGRAPH 2006

  9. Application: Hybrid Images • A. Oliva, A. Torralba, P.G. Schyns, “Hybrid Images,” SIGGRAPH 2006

  10. Today’s class • How to use filters for • Matching • Denoising • Anti-aliasing • Image representation with pyramids • Texture • What is it? • How to represent it?

  11. Matching with filters • Goal: find in image

  12. Matching with filters • Goal: find in image • Method 1: SSD Threshold at 0.8 1- sqrt(SSD) Input

  13. Matching with filters • Goal: find in image • Method 1: SSD • Method 2: Normalized cross-correlation Threshold at 0.5 Input Normalized X-Correlation

  14. Noise = + Gaussian Additive Noise Noisy Image

  15. Gaussian noise • Mathematical model: sum of many independent factors • Assumption: independent, zero-mean noise Source: M. Hebert

  16. Noise • Salt and pepper noise: contains random occurrences of black and white pixels • Impulse noise: contains random occurrences of white pixels • Gaussian noise: variations in intensity drawn from a Gaussian normal distribution Source: S. Seitz

  17. Denoising Gaussian Filter Additive Gaussian Noise

  18. Reducing Gaussian noise Smoothing with larger standard deviations suppresses noise, but also blurs the image Source: S. Lazebnik

  19. Reducing salt-and-pepper noise by Gaussian smoothing 3x3 5x5 7x7

  20. Alternative idea: Median filtering • A median filter operates over a window by selecting the median intensity in the window • Is median filtering linear? Source: K. Grauman

  21. Median filter • What advantage does median filtering have over Gaussian filtering? • Robustness to outliers Source: K. Grauman

  22. Median filter Median filtered Salt-and-pepper noise • MATLAB: medfilt2(image, [h w]) Source: M. Hebert

  23. Median vs. Gaussian filtering 3x3 5x5 7x7 Gaussian Median

  24. Subsampling by a factor of 2 • Throw away every other row and column to create a 1/2 size image

  25. Aliasing problem • 1D example (sinewave): Source: S. Marschner

  26. Aliasing problem • 1D example (sinewave): Source: S. Marschner

  27. Aliasing problem • Sub-sampling may be dangerous…. • Characteristic errors may appear: • “Wagon wheels rolling the wrong way in movies” • “Checkerboards disintegrate in ray tracing” • “Striped shirts look funny on color television” Source: D. Forsyth

  28. Aliasing in video Slide by Steve Seitz

  29. Aliasing in graphics Source: A. Efros

  30. Sampling and aliasing

  31. Nyquist-Shannon Sampling Theorem • When sampling a signal at discrete intervals, the sampling frequency must be  2  fmax; • fmax = max frequency of the input signal. • This will allows to reconstruct the original perfectly from the sampled version good v v v bad

  32. Anti-aliasing Solutions: • Sample more often • Get rid of all frequencies that are greater than half the new sampling frequency • Will lose information • But it’s better than aliasing • Apply a smoothing filter

  33. Algorithm for downsampling by factor of 2 • Start with image(h, w) • Apply low-pass filter • im_blur = imfilter(image, fspecial(‘gaussian’, 7, 1)) • Sample every other pixel • im_small = im_blur(1:2:end, 1:2:end);

  34. Anti-aliasing Forsyth and Ponce 2002

  35. Subsampling without pre-filtering 1/2 1/4 (2x zoom) 1/8 (4x zoom) Slide by Steve Seitz

  36. Subsampling with Gaussian pre-filtering Gaussian 1/2 G 1/4 G 1/8 Slide by Steve Seitz

  37. Gaussian pyramid Source: Forsyth

  38. Laplacian filter unit impulse Gaussian Laplacian of Gaussian Source: Lazebnik

  39. Laplacian pyramid Source: Forsyth

  40. Computing Gaussian/Laplacian Pyramid Can we reconstruct the original from the laplacian pyramid? http://sepwww.stanford.edu/~morgan/texturematch/paper_html/node3.html

  41. Related idea: 2d wavelets

  42. 2d Wavelets Matlab: wavemenu

  43. Image representation • Pixels: great for spatial resolution, poor access to frequency • Fourier transform: great for frequency, not for spatial info • Pyramids/wavelets: balance between spatial and frequency information

  44. Major uses of image pyramids • Compression • Object detection • Scale search • Features • Detecting stable interest points • Registration • Course-to-fine

  45. Texture Source: Forsyth

  46. Texture and Material http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

  47. Texture and Orientation http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

  48. Texture and Scale http://www-cvr.ai.uiuc.edu/ponce_grp/data/texture_database/samples/

  49. What is texture? • Regular or stochastic patterns caused by bumps, grooves, and/or markings

  50. How can we represent texture? • Measure frequencies at various orientations and scales

More Related