BBM 413 Fundamentals of Image Processing
Erkut Erdem
- Dept. of Computer Engineering
BBM 413 Fundamentals of Image Processing Erkut Erdem Dept. of - - PowerPoint PPT Presentation
BBM 413 Fundamentals of Image Processing Erkut Erdem Dept. of Computer Engineering Hacettepe University Frequency Domain Techniques Part 2 Review Frequency Domain Techniques Thinking images in terms of frequency. Treat
=&
)&
=& ...& ...& ...& ...&
2 2
−
Slide credit: A. Efros
– Magnitude encodes how much signal there is at a particular frequency – Phase encodes spatial information (indirectly) – For mathematical convenience, this is often notated in terms of real and complex numbers
2 2
−
Slide credit: B. Freeman and A. Torralba
Euler’s definition of eiθ
u, v : the transform or frequency variables x, y : the spatial or image variables
y=0 N−1
x=0 M−1
1 1 ) / / ( 2
− = − = +
M u N v N vy M ux j π
Slide credit: S. Thrun
Horizontal
Vertical orientation
45 deg.
fmax
fx in cycles/image Low spatial frequencies High spatial frequencies
Slide credit: B. Freeman and A. Torralba
Log power spectrum
Slide credit: A. Efros
Slide credit: D. Hoiem
Image: http://www.flickr.com/photos/igorms/136916757/
Slide credit: D. Hoiem
– write down the function’s values at many points
Slide credit: S. Marschner
– for output (need realizable method) – for analysis or processing (need mathematical method) – amounts to “guessing” what the function did in between
Slide credit: S. Marschner
– how can we be sure we are filling in the gaps correctly?
Slide credit: S. Marschner
Continuous signal: Shah function (Impulse train):
Sampled function:
∞ −∞ =
n s
∞ −∞ =
n
(Real world signal) (What the image measures)
Slide credit: S. Narasimhan
∞ −∞ =
n s
S u
n=−∞ ∞
max
A
Sampling frequency
Slide credit: S. Narasimhan
angular frequency ( )
iux
Note that these are derived using Slide credit: S. Narasimhan
∞ −∞ =
n s
S u
n=−∞ ∞
max
A
Sampling frequency
Slide credit: S. Narasimhan
∞ −∞ =
n s
S u
n=−∞ ∞
max
A
max
x A 1x
Sampling frequency
Slide credit: S. Narasimhan
Throw away every other row and column to create a 1/2 size image
Slide credit: D. Hoiem
– unsurprising result: information is lost – surprising result: indistinguishable from lower frequency – also was always indistinguishable from higher frequencies – aliasing: signals “traveling in disguise” as other frequencies
Slide credit: S. Marschner
– “Wagon wheels rolling the wrong way in movies” – “Checkerboards disintegrate in ray tracing” – “Striped shirts look funny on color television”
Slide credit: D. Forsyth
Moire patterns in real-world images. Here are comparison images by Dave Etchells of Imaging Resource using the Canon D60 (with an antialias filter) and the Sigma SD-9 (which has no antialias filter). The bands below the fur in the image at right are the kinds of artifacts that appear in images when no antialias filter is used. Sigma chose to eliminate the filter to get more sharpness, but the resulting apparent detail may or may not reflect features in the image.
Slide credit: N. Kumar
Slide credit: A. Farhadi
Slide credit: S. Seitz
Slide credit: A. Efros
Slide credit: D. Hoiem
∞ −∞ =
n s
S u
n=−∞ ∞
max
A
max
x A 1x
Sampling frequency
Slide credit: S. Narasimhan
Slide credit: S. Narasimhan
If
max
max
u
x A 1x
Only if
max
(Nyquist Frequency) We can use
Then
S
and Sampling frequency must be greater than
max
Slide credit: D. Hoiem
Good sampling Bad sampling
Slide credit: N. Kumar
– Will lose information – But it’s better than aliasing – Apply a smoothing filter
Slide credit: D. Hoiem
– remove high frequencies leaving only safe, low frequencies – choose lowest frequency in reconstruction (disambiguate)
Slide credit: S. Marschner
M k
∞ =−∞
1
∞ =−∞
2[ ]
1
Slide credit: B. K. Gunturk
∞ ∞ ∞ ∞ =−∞ =−∞ =−∞ =−∞
, ( , )
M N k l
∞ ∞ =−∞ =−∞
k l k l
∞ ∞ ∞ ∞ =−∞ =−∞ =−∞ =−∞
1 1 , ( , ) M N
, ( , ) M N
∞ ∞ =−∞ =−∞
Slide credit: B. K. Gunturk
2( )
1
12 1 2
1 2 2
Scaling
Slide credit: B. K. Gunturk
( ) f x
M
M
( ) F u
1 M
1 ( ) M
comb u
M
1
( )* ( )
M
F u comb u
Slide credit: B. K. Gunturk
( ) f x
( ) F u
1
( )* ( )
M
F u comb u
M
W W − M W 1 M
Slide credit: B. K. Gunturk
1
( )* ( )
M
F u comb u
M
M W 1 M 1 2M
Slide credit: B. K. Gunturk
Slide credit: B. K. Gunturk
( ) F u
W W −
1
( )* ( )
M
F u comb u
M
W 1 M
( ) f x
Slide credit: B. K. Gunturk
( ) F u
M
W W − 1M
W W −
1 2M
B.K. Gunturk
( ) f x
Slide credit: B. K. Gunturk
M
1 M
1
M
W 1 M
M
1 M
M
W 1 M
B.K. Gunturk
Slide credit: D. Hoiem
Slide credit: Forsyth and Ponce
Slide credit: S. Seitz
Slide credit: S. Seitz
1000 pixel width
[Philip Greenspun]
Slide credit: S. Marschner
250 pixel width by dropping pixels gaussian filter
[Philip Greenspun]
Slide credit: S. Marschner
Slide credit: A. Farhadi
f (x,y) f (x+1,y) f (x+1,y+1) f (x,y+1) f (x+0.8,y+0.3)
Slide credit: A. Farhadi
Slide credit: A. Farhadi
Slide credit: A. Farhadi
Slide credit: A. Farhadi
Images from Steve Lehar http://cns-alumni.bu.edu/~sleharAn Intuitive Explanation of Fourier Theory Fourier Amplitude
Multiply by a filter in the frequency domain => convolve with the filter in spatial domain.
Slide credit: S. Thrun
Magnitude and Phase: Raw Images: Reconstruct (inverse FFT) mixing the magnitude and phase images Phase “Wins”
Slide credit: S. Thrun
Slide credit: B. Freeman and A. Torralba
T
T
Slide credit: B. Freeman and A. Torralba
Probably ¡still ¡too ¡little… …but ¡hard ¡enough ¡for ¡now
h(x,y) e
x 2 y 2 2 2
1
T
T
Slide credit: B. Freeman and A. Torralba
x 2 y 2 2 2 e j2u0x
h(x,y;x0,y0) e
xxo
2 2
(x0, y0)
x 2 y 2 2 2 cos 2u0x
x 2 y 2 2 2 sin 2u0x
− x 2 +y 2 2σ 2 cos 2πu0x
u0=0
− x 2 +y 2 2σ 2 sin 2πu0x
U0=0.1 U0=0.2
Slide credit: B. Freeman and A. Torralba
Slide credit: B. Freeman and A. Torralba
66
Slide credit: B. Freeman and A. Torralba
(.)2 (.)2
Gabor wavelet:
x 2 y 2 2 2 e j2u0x
(x,y) e
Slide credit: B. Freeman and A. Torralba
(.)2 (.)2
edge energy response to an edge
Slide credit: B. Freeman and A. Torralba
line energy response to a line
Slide credit: B. Freeman and A. Torralba
Slide credit: B. Freeman and A. Torralba
(.)2 (.)2
Slide credit: B. Freeman and A. Torralba
n al Imag al Imag
x 2 y 2 2 2 e j2u0x
Slide credit: B. Freeman and A. Torralba
Filter Set:
0o 90o Synthesized 30o
Response:
Raw Image
Taken from:
“The Design and Use of Sterrable Filters”, IEEE
Machine Intell., vol 13, #9, pp 891-900, Sept 1991
Slide credit: B. Freeman and A. Torralba
hx(x,y) h(x,y) x
2 4 e
x 2 y 2 2 2
(x,y
hy(x,y) h(x,y) y
2 4 e
x 2 y 2 2 2
The ¡representation ¡is ¡“shiftable” ¡on ¡orientation: ¡We ¡can ¡interpolate ¡any ¡other
h(x,y) cos()hx(x,y) sin()hy(x,y)
The ¡representation ¡is ¡“shiftable” ¡on ¡orientation: ¡We ¡can ¡interpolate ¡any ¡other
+sin( ) =
Slide credit: B. Freeman and A. Torralba
Freeman & Adelson, 1992
Slide credit: B. Freeman and A. Torralba
V1 sketch: hypercolumns A pixel [r,g,b] An image patch
J.G.Daugman, “Two dimensional spectral analysis of cortical receptive field profiles,” Vision Res., vol.20.pp.847-856.1980
Intelligence, vol.19(7), July 1997, pp. 775-779.
Gabor filter pair in quadrature Gabor jet
Slide credit: B. Freeman and A. Torralba
Slide credit: B. Freeman and A. Torralba