Computer Vision - PowerPoint PPT Presentation

About This Presentation
Title:

Computer Vision

Description:

Computer Vision – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 46
Provided by: csC76
Learn more at: http://www.cs.cmu.edu
Category:
Tags: computer | tern | vision

less

Transcript and Presenter's Notes

Title: Computer Vision


1
Computer Vision
  • Spring 2006 15-385,-685
  • Instructor S. Narasimhan
  • Wean 5403
  • T-R 300pm 420pm

2
  • Image Processing and Filtering
  • (continued)
  • Lecture 6

3
Images are Discrete and Finite
4
Averaging
Lets think about averaging pixel values
Which is faster?
5
Averaging
The convolution kernel
6
Gaussian Smoothing
Gaussian kernel
(truncate, if necessary)
Use two 1D Gaussian filters
7
Gaussian Smoothing
  • A Gaussian kernel gives less weight to pixels
    further from the center of the window
  • This kernel is an approximation of a Gaussian
    function

0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
1 2 1
2 4 2
1 2 1
8
Gaussian Smoothing
original
9
Mean vs. Gaussian filtering
10
Gaussian Smoothing
by Charles Allen Gillbert
by Harmon Julesz
http//www.michaelbach.de/ot/cog_blureffects/index
.html
11
Gaussian Smoothing
http//www.michaelbach.de/ot/cog_blureffects/index
.html
12
Border Problem
13
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

14
Median Filter
  • Smoothing is averaging
  • (a) Blurs edges
  • (b) Sensitive to outliers

(a)
(b)
  • Sort values around the pixel
  • Select middle value (median)
  • Non-linear (Cannot be implemented with
    convolution)

15
Salt and pepper noise
Gaussian noise
3x3
5x5
7x7
16
Correlation
template
How do we locate the template in the image?
Cross-correlation
17
Cross-correlation
Note
Auto-correlation
18
Normalized Correlation
  • Account for energy differences

19
Image Processing in the Fourier Domain
Magnitude of the FT
Does not look anything like what we have seen
20
Image Processing in the Fourier Domain
Magnitude of the FT
Does not look anything like what we have seen
21
Convolution is Multiplication in Fourier Domain
F(sx,sy)
f(x,y)

h(x,y)
H(sx,sy)
g(x,y)
G(sx,sy)
22
Low-pass Filtering
Let the low frequencies pass and eliminating the
high frequencies.
Generates image with overall shading, but not
much detail
23
High-pass Filtering
Lets through the high frequencies (the detail),
but eliminates the low frequencies (the overall
shape). It acts like an edge enhancer.
24
Boosting High Frequencies
25
Most information at low frequencies!
26
Fun with Fourier Spectra
27
Image as a Discrete Function
28
Digital Images
  • The scene is
  • projected on a 2D plane,
  • sampled on a regular grid, and each sample is
  • quantized (rounded to the nearest integer)

Image as a matrix
29
Sampling Theorem
Continuous signal
Shah function (Impulse train)
Sampled function
30
Sampling Theorem
Sampled function
31
Nyquist Theorem
Aliasing
32
Aliasing
33
Alias n., an assumed name
Picket fence receding into the distance
will produce aliasing
34
Image Scaling
This image is too big to fit on the screen.
How can we reduce it? How to generate a
half- sized version?
35
Image Sub-Sampling
1/8
1/4
Throw away every other row and column to create a
1/2 size image - called image sub-sampling
36
Image Sub-Sampling
1/4 (2x zoom)
1/8 (4x zoom)
1/2
37
Good and Bad Sampling
  • Good sampling
  • Sample often or,
  • Sample wisely
  • Bad sampling
  • see aliasing in action!

38
Really bad in video
39
Sub-Sampling with Gaussian Pre-Filtering
G 1/8
G 1/4
Gaussian 1/2
  • Solution filter the image, then subsample
  • Filter size should double for each ½ size
    reduction. Why?

40
Sub-Sampling with Gaussian Pre-Filtering
G 1/4
G 1/8
Gaussian 1/2
41
Compare with...
1/4 (2x zoom)
1/8 (4x zoom)
1/2
42
Aliasing
43
Canon D60 (w/ anti-alias filter)
Sigma SD9 (w/o anti-alias filter)
From Rick Matthews website, images by Dave
Etchells
44
Figure from David Forsyth
45
Next Class
  • Image Processing and Filtering (continued)
  • Edge Detection
  • Horn, Chapter 6
Write a Comment
User Comments (0)
About PowerShow.com