Find edges (white pixels mean edges)
All edges
Contact edges
Vertical edges
Horizontal
You need to find edge locations!
Recover 3D
Y: 3D height
Z: 3D depth
(i, j)
y: 2D vertical
Estimating Y[i, j]: cues from vertical edges
CSE 5524: �Image processing – 4
4
Today
5
What is convolution?
What is convolution?
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
The convolution computation
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
What is Fourier transform?
Fourier transform
10
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Fourier transform
11
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Fourier transform
12
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
A signal can be represented by a linear combination of “periodic” functions!
Periodic functions (sine and cosine) in 2D
13
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Periodic functions (sine and cosine) in 2D
Periodic functions (sine and cosine) in 2D
Periodic functions (sine and cosine) in 2D
Frequencies and Phases
17
m
n
m
Fourier-like
transform
Amplitude
Phase
u
u
v
v
u
u
v
v
How about more complicated images?
Discrete Fourier transform (DFT)
Input image
Periodic functions (bases)
Pixel position
Frequency
Frequency response
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
For every (u, v), the computation is an inner product!
Inverse discrete Fourier transform (IDFT)
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Frequency response
Original image
What is “summed” is different from DFT
Example
21
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
For brevity
** Complex exponential **
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
j means “imaginary” part in complex values
Dive into DFT
Dive into DFT
Visualization
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Spatial
DFT: frequency
Amplitude: A
Visualization – images at different frequencies
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Why symmetric?
Why symmetric?
Convolution and Fourier
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Convolution and Fourier
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Spatial
DFT
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Spatial
DFT
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Spatial
DFT
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Spatial
DFT
Modulation
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Modulation
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Modulation, i.e., multiplication in time/space
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Fun editing by mixing phases
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Amplitude: A
Fun editing by mixing phases
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Amplitude: A
Today
41
Recap: Convolution and Fourier
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
What’s wrong? How to resolve?
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
“Linear” blur filters
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Box filters
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Box filters
46
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Box filter and its frequency response
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Binomial filters
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
2D binomial filters
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Example
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
How about this filter?
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Image derivatives
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
We can achieve this by convolution!
Frequency responses of the filters
[Figure credit: A. Torralba, P. Isola, and W. T. Freeman, Foundations of Computer Vision.]
Image Laplacian
Approximated Laplacian filter