Description
|
|||||||||
|
|||||||||
1. The following binary image B = |
|||||||||
is operated on by structuring elements S1 and S2
-
S1=
S2=
●
●
Assume that any pixels outside the region shown are 0. This is equivalent to assuming that B is embedded in a (potentially infinitely) larger image that is all 0.
a. What is obtained by dilating B by S1 and then eroding that result by S2?
b. What is obtained by dilating B by S2 and then eroding that result by S1?
2. Show that convolution is associative, that is
( ⃗) ∗ ‘ ( ⃗) ∗ ℎ( ⃗)* = ( ( ⃗) ∗ ( ⃗)) ∗ ℎ( ⃗)
-
What is the Discrete Fourier Transform of the simple x-direction mask, assuming that the 1 value is at the origin?
Use the 1-D DFT formula on p. 118 of Szeliski. You should be able to express the result as [constants] × e[something] × sin[something].
-
Use OpenCV or Matlab to smooth an image using the following operations:
-
-
Box Filter with= 5 in both directions,
-
-
-
Gaussian with σ=3, and
-
-
-
Median Filter using a 5×5 window (see Szieliski p. 108)
-
Show the original image – your choice! – and the 3 smoothed images.
Answer the following: What happens if you change the window size?