



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
Material Type: Assignment; Class: Digital Image Processing; Subject: Electrical & Computer Engr; University: Georgia Institute of Technology-Main Campus; Term: Fall 2003;
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 #
Issued: Wednesday, September 3, 2003 Due (live): Friday, September 12, 2003 Due (video): Friday, September 26, 2003
Problem 2.1 (Image Resizing): When magnifying an image, the goal is to produce a digital image y with support βL × βM pixels(with β > 1) from an image x with support L × M. Since the pixel locations in the larger image, y, do not coincide with pixel locations in x, interpolations between the pixels of x is needed. Two simple techniques that can be used for this purpose are the following: Nearest-Neighbor Interpolation: In this method the value of the new pixel S in image y is assigned as the value of the spatially closest pixel of x (when the inverse mapping is applied). Hence, S takes the value of one of S 1 , S 2 , S 3 , or S 4 , whichever is closest. Bilinear Interpolation: The new pixel S in image y is computed from the four closest (inverse mapped) pixels S 1 , S 2 , S 3 , and S 4 in image x.
S = (a)(b)S 1 + (1 − a)(b)S 2 + (a)(1 − b)S 3 + (1 − a)(1 − b)S 4
where
a =
(S 2 − S)h (S 2 − S 1 )h
b =
(S 3 − S)v (S 3 − S 1 )v
(a) For both techniques, answer the following: Is it linear? Is it shift-invariant? (b) Show that both schemes are separable. (c) We want to magnify a 4 × 4 image to size 8 × 8. Because of separability, we can write this as: y = AxB, where x is a 4 × 4 matrix, y is an 8 × 8 matrix and A and B are transposes of each other. Write A and B for both interpolation schemes. (d) Implement your own Matlab code for both schemes to magnify an image by an arbitrary factor β > 1. Magnify the cameraman image by a factor of 1.25. Turn in the magnified images. (e) Compare the subjective quality of the magnified images and describe your obser- vations.
Problem 1.2 (McClellan Transformations): Although procedures have been developed for the design of transformation functions, ad hoc methods often work well since the transformation typically involves very few free parameters. Ad hoc methods may take
the form of specifying the mapping function for a few key frequencies. As an example, consider a first-order transformation of the form
F (ω 1 , ω 2 ) = A + B cos ω 1 + C cos ω 2 + D cos ω 1 cos ω 2
to design a non-separable lowpass filter with a rhomboidal passband that approximates the ideal response
H(ω 1 , ω 2 ) =
{ 1 , |ω 1 | + |ω 2 | < π 0 , otherwise
(a) Find a reasonable set of values for A, B, C, and D. Justify your answer. (You might consider such factors as: if using a lowpass prototype filter, what value of ω should map to the center of the 2-D passband? Where should ω = π map? What symmetries should the transformation function have? Can the transformation coefficients be constrained to have a constant value of the transformation function on the cutoff boundary of the ideal filter? Each question like these defines one or more linear equations that the transformation parameters must satisfy. If you get enough equations, F is determined.)
(b) Sketch the response of a 1-D prototype filter to be used with this transformation to design an approximation to this filter.
(c) The goal of this part of the problem is to design a 3-D zero-phase FIR filter using a McClellan transformation. The idealized passband of the filter should have the shape of an octahedron as shown in Figure 1. The cross-sectional
Figure 1: Ideal octahedral frequency response for Problem 2.2.
views on selected planes of the frequency response, shown in Figure 2, define the orientation and cutoff frequencies of the passband. We propose to perform the
ω 1
ω 2
π
π
ω 3 = 0
ω 1
ω 3
π
π
ω 2 = 0
ω 2
ω 3
π
π
ω 1 = 0
Figure 2: Cross-sections of octahedral frequency response.
design using a transformation of the form
F (ω 1 , ω 2 , ω 3 ) = A + B cos ω 1 + C cos ω 2 + D cos ω 3 + E cos ω 1 cos ω 2 +F cos ω 1 cos ω 3 + G cos ω 2 cos ω 3 + H cos ω 1 cos ω 2 cos ω 3
and a 1-D prototype filter that approximates the ideal behavior shown in Fig- ure 3.
Solution:
(3) Because of the symmetry constraints imposed in part (b), we only need to consider a single constraint equation. Using the one when ω 3 = 0 and incorporating the above symmetry constraints
const = A + B cos ω 1 + B cos(π − ω 1 ) + B +E cos ω 1 cos(π − ω 1 ) + E cos ω 1 cos(π − ω 1 ) +E cos ω 1 + E cos(π − ω 1 ) + H cos ω 1 cos(π − ω 1 ) = (A + B) + (0) cos ω 1 − (E + H) cos^2 ω 1.
This equation implies the additional constraint
E = −H.
(4) At this point we have eight variables and six independent constraints. We can get a seventh by observing that the value of the constant in (3) should be zero since the outer boundary of the octahedron should correspond to ω = π/2 and cos(π/2) = 0. Therefore,
A = −B
A candidate for an eighth equation is to map ω = π to the corners of the cube (−π, π) × (−π, π) × (−π, π).
− 1 = F (π, π, π) − 1 = A − 3 B + 3E − H.
Solving these equations gives
A = − 3 /8; B = C = D = 3/8; E = F = G = 1/8; H = − 1 / 8.
Problem 1.3 (Computing an Impulse Response): The ideal circular lowpass filter has the impulse response
hc[n 1 , n 2 ] =
2 π
√ n^21 + n^22 ) √ n^21 + n^22
and frequency response
Hc(ω 1 , ω 2 ) =
{ 1 , ω^21 + ω 22 ≤ W 2 < π^2 0 , otherwise.
Determine the impulse response of the ideal elliptical lowpass filter that has the fre- quency response
He(ω 1 , ω 2 ) =
{ 1 , ω
(^21) a^2 +^
ω^22 b^2 ≤^1 0 , otherwise. where 0 < a ≤ b ≤ π.
Solution: Observe that He(ω 1 , ω 2 ) is simply a frequency scaled version of Hc(ω 1 , ω 2 ).
He(ω 1 , ω 2 ) = Hc
( ω 1
a
, ω 2
b
) .
This substitution of variables can be applied to the inverse Fourier transform integral. Manipulating the integral into a form that is recognizable from the inverse Fourier transform of Hc(ω 1 , ω 2 ) allows us to write
he[n 1 , n 2 ] =
ab W 2
2 π
√ ( (^) Wa n 1 )^2 + ( (^) Wb n 2 )^2 ) √ ( (^) Wa n 1 )^2 + ( (^) Wb n 2 )^2
ab 2 π
(√ (an 1 )^2 + (bn 2 )^2
)
√ (an 1 )^2 + (bn 2 )^2