Programming Assignment 1 - Computer Vision | CAP 5415, Assignments of Computer Science

Material Type: Assignment; Class: COMPUTER VISION; Subject: Computer Applications; University: University of Central Florida; Term: Spring 2003;

Typology: Assignments

Pre 2010

Uploaded on 11/08/2009

koofers-user-zn1
koofers-user-zn1 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CAP5415 Computer Vision
Programming Assignment # 1
1. Write a function Convolution(Image I, Kernel H) that has arguments
a. Image I (Images may be of varying sizes and you may want to give the
size as arguments. If you are using MATLAB, you can compute size
within the function)
b. Kernel H (Again, you should allow varying size Kernels)
The output of function should be the convolution of I with H. Test your function
and show results on the following Kernels.
i. Averaging Kernel ( 33
ร—
and 55
ร—
)
ii. Gaussian Kernel ( 3,2,1
=
ฯƒ
) Use )13()13(
+
ร—
+
ฯƒ
ฯƒ
as size of
Kernel (You may want to write a separate function to generate
Gaussian Kernels for different values of
ฯƒ
)
iii. Roberts Edge Operators: ๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜…
๎˜†
โˆ’
โˆ’
11
11 and ๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜…
๎˜†
โˆ’
โˆ’
11
11
iv. Sobel Edge Operators
๎˜
๎˜
๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜„
๎˜„
๎˜…
๎˜†โˆ’โˆ’โˆ’
121
000
121
and
๎˜
๎˜
๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜„
๎˜„
๎˜…
๎˜†
โˆ’
โˆ’
โˆ’
101
202
101
v. Prewitt Edge Operators
๎˜
๎˜
๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜„
๎˜„
๎˜…
๎˜†
โˆ’
โˆ’โˆ’
โˆ’
111
121
111
and
๎˜
๎˜
๎˜
๎˜‚
๎˜ƒ
๎˜„
๎˜„
๎˜„
๎˜…
๎˜†
โˆ’โˆ’
โˆ’โˆ’
111
121
111
2. Write a function Reduce(Image I) that has an image as an input and the output
should be re-sampled copy of half the width and height of the input image. Use
the two 1D gaussian kernels as discussed in class.
3. Write a function Expand(Image I) that has an image as an input and the output is
the expanded copy of input image, twice the width and height of original image.
4. Use the Reduce function in (2) to write a function GaussianPyramids(Image I,
Levels n) that produces n levels of gaussian pyramid for image I.
5. Use the above functions to write a function LaplacianPyramids(Image I, Levels n)
that produces n levels of Laplacian pyramid of image I.
pf2

Partial preview of the text

Download Programming Assignment 1 - Computer Vision | CAP 5415 and more Assignments Computer Science in PDF only on Docsity!

CAP5415 Computer Vision Programming Assignment # 1

  1. Write a function Convolution(Image I, Kernel H) that has arguments a. Image I (Images may be of varying sizes and you may want to give the size as arguments. If you are using MATLAB, you can compute size within the function) b. Kernel H (Again, you should allow varying size Kernels) The output of function should be the convolution of I with H. Test your function and show results on the following Kernels. i. Averaging Kernel ( 3 ร— 3 and 5 ร— 5 ) ii. Gaussian Kernel ( ฯƒ = 1 , 2 , 3 ) Use ( 3 ฯƒ + 1 )ร—( 3 ฯƒ+ 1 )as size of Kernel (You may want to write a separate function to generate Gaussian Kernels for different values of ฯƒ ) iii. Roberts Edge Operators: (^)  

(^1 1) and 

iv. Sobel Edge Operators 

and 

v. Prewitt Edge Operators 

and 

  1. Write a function Reduce(Image I) that has an image as an input and the output should be re-sampled copy of half the width and height of the input image. Use the two 1D gaussian kernels as discussed in class.
  2. Write a function Expand(Image I) that has an image as an input and the output is the expanded copy of input image, twice the width and height of original image.
  3. Use the Reduce function in (2) to write a function GaussianPyramids(Image I, Levels n ) that produces n levels of gaussian pyramid for image I.
  4. Use the above functions to write a function LaplacianPyramids(Image I, Levels n ) that produces n levels of Laplacian pyramid of image I.

Deliverables:

  1. Report including Input and Output images (Soft Copy)
  2. Code (Soft copy)

Send your assignments by email to [email protected]. Submission Deadline: February 11, 2003 (23:59)