Docsity

CMSC426 Homework 2: Image Processing and Convolution - Prof. Ramani Duraiswami, Assignments of Computer Science

Toggle sidebar
bg1
Homework 2: CMSC426 Due 02/28/2005, 3:30 p.m.
Please hand it in class. If you cannot make it to class, send me email at least two hours before
class, and I will give you alternate instructions.
Read Chapter 1, Chapter 7 (except 7.4, 7.6 and 7.8), Chapter 8 (up to and including Section
8.3.2), and the following parts of Chapter 9( up to and including 9.2)
1) Download an image of your choice from the internet. Print a copy of it. Apply a 5x5
averaging (“box”) filter to it, and display and print the results. You should find the
matlab functions imshow, imfilter, and fspecial to be helpful. Repeat this process with a
10x10 and a 20x20 averaging filter, display and printing the results. You should turn in a
total of four images; the original image and the image smoothed by three different filters.
2) Show that because the Gaussian in multiple dimensions is “separable”, convolution in
two dimensions can be done as two one-dimensional convolutions. How could this result
be used to achieve more efficient implementation of two-dimensional convolution?
3) Write Matlab functions that will take an image and respectively return the Gaussian and
Laplacian pyramids of an image. Your functions should take the scale, σ, of the Gaussian
as an input. Use it on the image ‘flowers.tif’, with a value of σ=3pixels.
Remarks:
a. The filter size for the Gaussian should be chosen so that 99% of the energy of
the Gaussian is accounted for.
b. Choose the number of levels automatically
c. Print out your images
4 On the same image apply the Canny edge operator in Matlab for different threshold
values. Remark on the behavior of the output for different threshold values.

Partial preview of the text

Download CMSC426 Homework 2: Image Processing and Convolution - Prof. Ramani Duraiswami and more Assignments Computer Science in PDF only on Docsity!

Homework 2: CMSC426 Due 02/28/2005, 3:30 p.m.

Please hand it in class. If you cannot make it to class, send me email at least two hours before class, and I will give you alternate instructions.

Read Chapter 1, Chapter 7 (except 7.4, 7.6 and 7.8), Chapter 8 (up to and including Section 8.3.2), and the following parts of Chapter 9( up to and including 9.2)

  1. Download an image of your choice from the internet. Print a copy of it. Apply a 5x averaging (“box”) filter to it, and display and print the results. You should find the matlab functions imshow , imfilter , and fspecial to be helpful. Repeat this process with a 10x10 and a 20x20 averaging filter, display and printing the results. You should turn in a total of four images; the original image and the image smoothed by three different filters.
  2. Show that because the Gaussian in multiple dimensions is “separable”, convolution in two dimensions can be done as two one-dimensional convolutions. How could this result be used to achieve more efficient implementation of two-dimensional convolution?
  3. Write Matlab functions that will take an image and respectively return the Gaussian and Laplacian pyramids of an image. Your functions should take the scale, σ, of the Gaussian as an input. Use it on the image ‘flowers.tif’, with a value of σ=3pixels. Remarks: a. The filter size for the Gaussian should be chosen so that 99% of the energy of the Gaussian is accounted for. b. Choose the number of levels automatically c. Print out your images

4 On the same image apply the Canny edge operator in Matlab for different threshold values. Remark on the behavior of the output for different threshold values.