University at Buffalo
Department of Computer Science and and Engineering CSE 473/573 – Computer Vision and Image Processing
Instructions
Spring 2021, TuTh 9:30AM-10:50AM
Homework #2
Due Date: 3/4/21, 11:59PM
• Answer the questions below, and provide as much of your work as necessary.
• Export or scan your homework and store it as a PDF version before submitting online to
UBLearns.
1 Convolution (15 points)
1 1 2 3 0 0 Suppose we have an input image which is 1 2 1 and a convolution kernel which is 0 0 0
211 002
• Determine the padding needed so that we can keep the image size unchanged before and after convolution(5 pts)
• Determine the output of the convolution(10 pts) Note: Assume we set stride as 1 and padding as 0.
2 Filter Design (15 points)
Design a 5×5 filter which can shift image up by 2 pixels and to the left by 1 pixel.
1
CSE 473/573 Homework 2 Spring 2021
3 Gaussian Filter Separability (30 points)
One of the characteristics of Gaussian filter is that a 2D filter can be expressed as the product of
two 1D Gaussian filters. Please express the following 2D 5×5 Gaussian filter as the product of two
1D Gaussian filters.
14 7 41
4
4 16 28 16 4 G= 1 7 28 49 28 7 2894 16 28 16 4
14741
Provide an example that demonstrates your answer is accurate.
Feature Matching (40 points)
Short Answer
• What is the value range for squared differences (SSD) and cross-correlation (CC)? (10 pts each)
• Explain the reasons for your answer. (20 pts)
Page 2 of 2