



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to problem set #3 in the digital image processing course offered by the georgia institute of technology, school of electrical and computer engineering. The problems cover topics such as 2-d recursive systems, image sampling, and video sampling. Students are asked to determine system functions, impulse responses, sampling matrices, and fourier transforms.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




School of Electrical and Computer Engineering
ECE 6258 Digital Image Processing Fall 2003
Problem Set #3–Solutions
Issued: Friday, September 12, 2003 Due (live): Monday, September 22, 2003 Due (video): Monday, October 6, 2003
Problem 3.1 (2-D Recursive Systems): A linear shift-invariant two-dimensional sys- tem is defined by the difference equation
y[n 1 , n 2 ] − 0. 7 y[n 1 + 1, n 2 ] + 0. 2 y[n 1 + 1, n 2 + 1] = x[n 1 , n 2 ]
(a) Determine the system function Hz (z 1 , z 2 ). (b) If the filter is implemented using the recursion equation
y[n 1 , n 2 ] = x[n 1 , n 2 ] + 0. 7 y[n 1 + 1, n 2 ] − 0. 2 y[n 1 + 1, n 2 + 1]
determine the region of support of the impulse response, h[n 1 , n 2 ], i.e. those values of [n 1 , n 2 ] where the impulse response can be nonzero. (c) Specify a sufficient set of boundary values for evaluating y[n 1 , n 2 ] if x[n 1 , n 2 ] is nonzero for 0 ≤ n 1 ≤ N 1 − 1, 0 ≤ n 2 ≤ N 2 − 1. (d) Determine whether or not the filter is stable.
Solution:
Hz (z 1 , z 2 ) =
1 − 0. 7 z 1 + 0. 2 z 1 z 2 (a) The filter support fills the 45◦^ wedge shown in the following figure
n 1
n 2
(b) This differs from (a) only to the extent that we must include the effect of the support of x on the support of y. y[n 1 , n 2 ] has support in the shaded region below. We need initial conditions on the top and right hand sides. If we only need the samples of y in the first quadrant, then we can use initial conditions at
n 2 = N 2 ; n 1 = 1,... , N 1 n 1 = N 1 ; n 2 = 1,... , N 2.
n 1
n 2
(c) It is stable. Map the filter to quadrant 1 by replacing z 1 by ˆz 1 − 1 and z 1 z 2 by ˆz 2 − 1. It is now of the form
1 1 − azˆ 1 − 1 − bzˆ 2 −^1
for which we know the filter is stable if |a| + |b| < 1, which is the case here.
Problem 3.2 (Image Sampling): In a feeble attempt to unify the nation’s sampling grids, Hannibal Hamlin once decreed that henceforth all analog imagery in the coun- try should have the spectral support (bandwidth) indicated below. Fortunately, the decree was struck down by the Supreme Court before it would have become effective.
3 π
− 3 π
− 4 π 4 π
(a) Determine an aliasing matrix U that will permit periodic replication of the spec- trum without aliasing in a way that will minimize the required sampling density. (b) Determine a consistent sampling matrix V that would define an optimal sampling lattice for this spectral support. (c) What is the sampling density at which all of the country’s images would have been sampled?
Solution: (a) The approach is first to find a periodic replication of the spectrum that will come as close as possible to tiling the entire frequency plane. From that lattice of spectral replications, we can find the U matrix, from
(b) Because the spectrum is infinitely thin in the ωt direction, the samples in the t-direction can be infinitely far apart, i.e. we only need to have one layer of samples in the t-direction. This makes sense, because if we assume that vx and vy are known, we can reconstruct the entire signal from o(x, y). That signal, in turn, can be reconstructed from, for example, its rectangular samples taken with a horizontal and vertical spacing of π/W.
Problem 3.4 (The 2-D Discrete Fourier Series (DFS)): Suppose that ˜x[n 1 , n 2 ] is a rectangularly periodic sequence with horizontal period N 1 and vertical period N 2. The sequence ˜x 1 [n] = ˜x[n, n] is then a periodic one-dimensional sequence.
(a) Show that ˜x[n] is a periodic sequence with period N 1 N 2. Show that if N 1 and N 2 have any common integral factors then ˜x[n] will also have a smaller period. (Hint: Draw some pictures.) (b) Assuming that N 1 and N 2 have no common factors, show that the samples of the DFS coefficients X˜ 1 [k] are equal to selected values of X˜[k 1 , k 2 ] and determine the mapping between k and [k 1 , k 2 ].
If the row-column algorithm is used to evaluate the 2-D DFS coefficients, X˜[k 1 , k 2 ] this is an efficient algorithm for computing the one-dimensional DFS X˜ 1 [k] known as the prime factor algorithm. It predates the Cooley-Tukey (FFT) algorithm and is more efficient than that algorithm, but places an inconvenient restriction on the length of the transform.
Solution: (a)
x˜ 1 [n + N 1 N 2 ] = ˜x 2 [n + N 1 N 2 , n + N 1 N 2 ] = ˜x 2 [n, n + N 1 N 2 ] (by horizontal periodicity) = ˜x 2 [n, n] (by vertical periodicity) = ˜x 1 [n].
In the more general case the period is N = N 1 N 2 /gcd(N 1 , N 2 ), where gcd(.,.) is the greatest common divisor. Since N is a multiple of both N 1 and N 2 , the proof is the same as the one above. (b)
X˜ 1 [k] =
N (^1) ∑N 2 − 1
n=
x ˜ 2 [n, n]W (^) Nnk 1 N 2
N (^1) ∑N 2 − 1
n=
∑^ N^1
k 1 =
∑^ N^2
k 2 =
X^ ˜ 2 [k 1 , k 2 ]W (^) N−nk^1 1 W^
−nk 2 N 2 W^
nk N 1 N 2
∑ k 1 = 0N^1
∑^ N^2
k 2 =
X^ ˜ 2 [k 1 , k 2 ]
N (^1) ∑N 2 − 1
n=
[ W (^) N− 1 k 1 W (^) N− 2 k 2 W (^) Nk 1 N 2
]n .
The innermost sum is zero unless k = N 1 k 2 + N 2 k 1. Therefore,
X˜ 1 [k] =
∑^ N^1
k 1
∑^ N^2
k 2
X^ ˜ 2 [k 1 , k 2 ]δ[k − N 1 k 2 − N 2 k 1 ].
Since N 1 and N 2 are relatively prime, each value of [k 1 , k 2 ] over the range of summation contributes to only one value of k. The samples in X˜ 1 [k] are simply the samples of X˜ 2 [k 1 , k 2 ] scrambled.