COMP4528: Computer Vision Semester 1, 2023 Tutorial 3
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Semester 1, 2023
Tutorial 3
COMP4528: Computer Vision
Question 1 Correlation and Convolution Calculations
1. If you were to apply the filter as a convolution:
to the image
what would be the results? What would the results be if it was a correlation? Note that we are using the “valid” mode1 in this question.
2. Consider the 5 × 5 image below. The pixel grey values are indicated by the values in the cells.
(a) Apply a 3 × 3 median filter to the image. Note that to avoid problems at the edges of the image you only need to calculate the filtered values for the central 3 × 3 region (“valid” mode).
(b) Apply the vertical edge filter used by the Sobel edge detector to the image above. Again, you only need to calculate the results for the central 3 × 3 region (“valid” mode).
Note: in solving this problem, please use a “convolution” rather than “correlation” operator to implement the image filtering.
Question 2 Edge Detection
1. The vertical and horizontal Sobel filters for correlation operations are given below
Please explain the effects of these two filters. How would you use these filters to obtain the orientation of the gradient?
Question 3 Correlation and Convolution Programming Questions
1. Complete the coding questions in COMP4528 lab3 code.ipynb .
Question 4 Optional: Deeper Understanding to Convolution
1. !! The filter is separable. Write down the separate components of this filter.
2. !!! Compare the following two operations:
(a) you first apply a 3 × 3 Gaussian filter (G) to an image I then followed by a Sobel filter (S);
(b) you first apply a Sobel filter S to the Gaussian filter G, then convolve image I with this filter (S * G).
Mathematically speaking, these two different operations should give you equivalent results, i.e., S * (G * I) = (S * G) * I, given that we are using the “full” padding mode for convolutions (i.e., how convolutions are usually performed in signal processing). However, in practice one operation often produces better (more efficient) results than the other. Please explain why, and which one is your preferred edge detector?
2023-07-28