CS代写 CPSC 425 Linear Filtering 20 (Term 2) Practice Questions – cscodehelp代写

CPSC 425 Linear Filtering 20 (Term 2) Practice Questions
Multiple Part True/False Questions. For each question, indicate which of the statements, (A)–(D), are true and which are false? Note: Questions may have zero, one or multiple statements that are true.
Question 1: Which of the following statements are true of a 2D (circular) pillbox filter? Which are false?
(A) A 2D (circular) pillbox filter is separable.
(B) A 2D (circular) pillbox filter is rotationally invariant.
(C) Smoothing with a 2D (circular) pillbox filter acts like a “low-pass” filter. This reduces arti- facts owing to sub-sampling when we construct a pyramid scaled representation.
(D) Smoothing with a 2D (circular) pillbox models “blurring” that occurs when the lens is out of focus.
Short Answer Questions. Question 2:
(a) Give a 3 × 3 linear filter that shifts an image 1 pixel downwards and also reduces the image brightness by 50%. Assume the filter is to be implemented as a correlation.
(b) Using your answer to part (a), what is the 3 × 3 linear filter if it is to be implemented as a convolution?
Question 3: Digital filtering in computer vision often includes some form of normalization of the filter values. In a sentence or two for each, describe a situation (or task) where the filter values are
(a) normalized to sum to one.
(b) normalized to sum to zero.
(c) normalized so that the sum of the squared values is one (i.e., the filter has magnitude one).
Question 4: In this question, we compare the computational costs of convolution with and without using separable filters. We just count the number of multiplication operations required, as they typically dominate the cost of convolution.
(a) Let S be the number of multiplication operations required to convolve a Gaussian filter with an image of size n × n pixels. Assume that we use two separable 1D filters, each of length 6 σ as in Assignment 2. Give an expression for S in terms of σ and n. For simplicity, express S as a real number without accounting for integer roundoff in filter length or any special treatment near image boundaries.
(b) Let R be the number of multiplications operations required to convolve the equivalent single 2D Gaussian filter with an image of size n × n pixels, rather than using the two separable 1D filters. Give an expression for R in terms of σ and n. Again, express R as a real number without accounting for integer roundoff in filter length or any special treatment near image boundaries.
Question 5:
(a) We can smooth an image by convolving the 1D vector [0.25, 0.5, 0.25] with the rows and then the columns of the image. Instead, give the 2D matrix that combines these row and column operations into a single 3 × 3 filter that can be convolved with the image. Hint: The calculation is easier if you represent the 1D vector with fractions, as in [1/4, 1/2, 1/4].
(b) Following this smoothing, we wish to use the 1D filter [−1, 0, 1], applied to the rows of the image, to calculate the first central difference in the horizontal direction and thus esti- mate image gradients corresponding to vertical edges. Combine this 1D filter with your answer from part (a) to generate a single 2D filter that estimates the horizontal derivative of the smoothed image. Hint: Be sure to indicate whether you intend your final filter to be implemented as a correlation or as a convolution.

Leave a Reply

Your email address will not be published. Required fields are marked *