# CSC420 Intro to Image Understanding Assignment 1 solved

\$35.00

Category:

## Description

1. [2.5 points] Write your own function that implements the correlation (for grayscale or
color images and 2D filters) between an input image and a given correlation filter.
The function must take as input: an input image ‘I’, a filter ‘f’, and a string ‘mode’,
that can either be ‘valid’, ‘same’ or ‘full’. The output must match what is specified by
‘mode’.
2. [1 point] How would you use your function from part A to calculate the
convolution between a filter and an image? Use your function from question 1 to
convolve iris.jpg with a Gaussian filter σ , , use ‘mode’ = ‘same’. x = 3 σ y = 5
3. [1 point] Is convolution a commutative operation (f*g =? g*f)? Is correlation a
commutative operation? Briefly Explain.
4. [1 point] Is the horizontal derivative. ∂G(x,y)/∂x , of a Gaussian filter G a separable
filter? Explain.
5. [1 point] Given a n × n image, I, and m × m filter, h, what is the computational cost of
computing h • I if h is not separable? What is the computational cost if h is
separable?
6. [1 point] Construct two different separable filters, such that when added, the result is
a separable filter.
7. [1 point] Apply the derivative of Gaussian filter and Laplacian of Gaussian filter to