Docsity

EECS 556 Exam 2: Image Processing and Subpixel Edge Detection, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
EECS 556, 2002 Exam #2 1
Take-Home Exam #2
• You may have 24 hours to work on this exam. You must enter your name and sign-out and
sign-in times on the log sheet in BIRB 1089. There is a 1 hour grace period.
• You may use your books, your own notes, web resources, computers and calculators.
• You may not seek assistance, share or borrow notes from any current and former students or
any other individual (instructors’ notes available on the web are OK).
• This exam is governed by the Engineering Honor Code, which requires that you do not seek
assistance on this exam and that you report any violations of the Honor Code. (For more info
see http://www.engin.umich.edu/org/ehc/index.html).
• On the first page of your solutions, write “I have neither given nor received aid on this
exam,” and sign your name below it.
• Show your work and hand in all Matlab code.
• If parts of the exam are not clear and you cannot find the instructor to ask for clarification,
please write your assumptions and proceed with the question. If you cannot solve a part that
is needed later in the solution, define a parameter to represent the answer of that part and
continue.
• Write legibly (yes I know I don’t, but…)
• Please remember to put your name on your exam solutions.
• Good luck!
1. In this problem you will investigate subpixel edge detection using interpolation methods we
discussed in class. Matlab template ex2p1_template.m creates two images xmini and
xfull, reduced (64x64) and full resolution (320x320) images, respectively.
a. Implement a convolution interpolation method to increase the sampling density of
xmini to that of xfull. Your solution must use the conv2 function. Implement
nearest neighbor, bi-linear and bi-cubic interpolation. For cubic interpolation, use this
kernel:
≤<
≤
−+−
+−
=
otherwise
x
x
xxx
xx
xh21
1
0
,5.05.242
,5.15.21
)( 3
2
3
2
.
Display the resultant images (and xfull) using imagesc.
b. Compare the different interpolation methods in terms of Mean Square Error (MSE)
relative to xfull and in terms of computation time. For MSE calculations, be careful of
shifts of your interpolated image relative to xfull. Which method is best? Comment on
whether or not this is what was expected and why.
c. Apply a Sobel gradient-based edge detection algorithm to the interpolated images and
xfull. You may need to make small modifications to the thresholding levels and edge
thinning algorithms that were used in HW #6. Do not use the Matlab edge function and
use exactly the same edge detection parameters/algorithms for each interpolated image.
Display the resultant edge maps. Which method is best?
d. Using the find command applied to row number 152 (e.g. find(edgemap(152,:)))
of the edge maps, determine the width in number of pixels of the object of for xfull
and interpolated images. Compare to the theoretical width based on code in the template.
pf2

Partial preview of the text

Download EECS 556 Exam 2: Image Processing and Subpixel Edge Detection and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

EECS 556, 2002 Exam #2 1

Take-Home Exam #

  • You may have 24 hours to work on this exam. You must enter your name and sign-out and sign-in times on the log sheet in BIRB 1089. There is a 1 hour grace period.
  • You may use your books, your own notes, web resources, computers and calculators.
  • You may not seek assistance, share or borrow notes from any current and former students or any other individual (instructors’ notes available on the web are OK).
  • This exam is governed by the Engineering Honor Code, which requires that you do not seek assistance on this exam and that you report any violations of the Honor Code. (For more info see http://www.engin.umich.edu/org/ehc/index.html).
  • On the first page of your solutions, write “I have neither given nor received aid on this exam,” and sign your name below it.
  • Show your work and hand in all Matlab code.
  • If parts of the exam are not clear and you cannot find the instructor to ask for clarification, please write your assumptions and proceed with the question. If you cannot solve a part that is needed later in the solution, define a parameter to represent the answer of that part and continue.
  • Write legibly (yes I know I don’t, but…)
  • Please remember to put your name on your exam solutions.
  • Good luck!
  1. In this problem you will investigate subpixel edge detection using interpolation methods we discussed in class. Matlab template ex2p1_template.m creates two images xmini and xfull, reduced (64x64) and full resolution (320x320) images, respectively. a. Implement a convolution interpolation method to increase the sampling density of xmini to that of xfull. Your solution must use the conv2 function. Implement nearest neighbor, bi-linear and bi-cubic interpolation. For cubic interpolation, use this

kernel:

otherwise

x

x x x x

x x h x 1 2

2 3

2 3

.

Display the resultant images (and xfull) using imagesc. b. Compare the different interpolation methods in terms of Mean Square Error (MSE) relative to xfull and in terms of computation time. For MSE calculations, be careful of shifts of your interpolated image relative to xfull. Which method is best? Comment on whether or not this is what was expected and why. c. Apply a Sobel gradient-based edge detection algorithm to the interpolated images and xfull. You may need to make small modifications to the thresholding levels and edge thinning algorithms that were used in HW #6. Do not use the Matlab edge function and use exactly the same edge detection parameters/algorithms for each interpolated image. Display the resultant edge maps. Which method is best? d. Using the find command applied to row number 152 (e.g. find(edgemap(152,:))) of the edge maps, determine the width in number of pixels of the object of for xfull and interpolated images. Compare to the theoretical width based on code in the template.

EECS 556, 2002 Exam #2 2

If there are too many edges, you may need to look at the gradient maps to determine the true edge.

  1. Wiener filtering using empirically derived values. We will use the picture of the house again (hw7image.mat). Download ex2p2_template.m. This template creates a noisy version of the image. You will derive a linear space invariant Wiener filter for this image and blocked (space variant) Wiener filter.

a. We will use a signal model with an autocorrelation function 2 2 2 Rs ( n , m ) = σ (^) sa n + m. Give an expression for the autocorrelation function of the noisy image y ( n , m )= s ( n , m )+ w ( n , m ). b. Choose a background (e.g. sky) area and estimate the noise variance σ ˆ^ w^2. Is the close to the theoretical variance derived from the code? c. Since the image is not zero mean, we will want to use the affine form of the Wiener filter. After eliminating the mean, find estimates of R ˆ^ (^) y ( 0 , 0 ), R ˆ^ (^) y ( 1 , 0 ), and R ˆ^ (^) y ( 0 , 1 ). From

these derive an estimate of a ˆ and σ^ ˆ^ s^2 , and thus R ˆ^ s ( n , m ). d. From your empirical estimates, derive the L.S.I. Wiener filter and apply to the image. Determine the MSE of the original noisy image and the filtered image relative to noise- free image. e. Now, we will do similar filtering on 48x48 sized blocks (a total of 150). Repeat steps c. and d. for all blocks. Determine the MSE of the filtered image relative to noise-free image. f. Comment on which approach is better. How might you improve on the results using the method of part e.?

  1. Noise and deblurring. Consider the following system with two additive noise sources and a blurring function b ( n , m ): f

b(n,m)

w

v

g

a. Derive the L.S.I. filter, H ( ω (^) x , ωy ), that you would apply to g ( n , m )to produce an

estimate of f , f ˆ^ ( n , m ) that minimizes the MSE. Assume that w and v are independent white noise processes with variances σ w^2 and σ v^2 , respectively. Also assume that they are independent of f. b. Now consider a case where w and v come from the following functions:

1 2

1 vnm z nm anm B z n m

wnm A z nm = + ⋅

where z 1 and z 2 are independent, white, zero-mean processes, A and B are constants and a is some convolution function. Derive the autocorrelation functions, power spectra, cross correlation functions, and cross power spectral functions: Rw , Rv , Rwv , Pw , Pv , Pwv. Derive, also, expressions for the variances σ w^2 and σ v^2. c. Repeat part a. for the new descriptions of w and v.