$24
Task 1 – You learned about the Convolution Theorem. Now it’s time to put it into test. (50 points)
The application that you’ll create will admit as input a grayscale digital image and a square kernel. It is up to you to decide how the user will input them (path to a file through the command line or clicking into boxes in a user interface, etc).
Your application will filter the input image with the given kernel using both methods: convolution and through the tactic of the Convolution Theorem. If everything goes correctly, both methods should provide the exact same output.
2 2
Task 2 – The Laplacian operator is defined as: ∇2 f = ∂ f + ∂ f
(30 points)
∂ x2
∂ y 2
where f represents the input image. Your task is to prove that the Laplacian operator is not
influenced by rotations. In other words, say we rotate the pixel at location (x,y) using the familiar rotation matrix:
x=x ' cos(θ)− y ' sin (θ)
y =x ' sin (θ)+ y ' cos (θ)
where x’ and y’ represent the rotated versions of respectively x and y.
2 2 2 2
You are requested to prove that ∇2 f = ∂ f + ∂ f = ∂ f + ∂ f
Hint: ∂ f = ∂ f ∂ x
∂ f ∂ y
∂ x2
∂ y 2
∂ x ' 2
∂ y '2
∂ x '
∂ x ∂ x ' + ∂ y ∂ x '
Task 3 – You feel lucky today, and you decide to develop a new filter h (20 points). Given a pixel
p=( x , y )∈ ℤ2 in an image f, your filter is defined as:
h ( x , y)=3 f ( x , y )+2 f ( x −1, y )+2 f ( x +1, y)−17 f ( x , y−1 )+ 99 f ( x , y+1)
a) Is h linear? Prove your answer.
b) Provide the convolution mask corresponding to h.
Good luck.