Question: Implement convolving a kernel with an image in code with python .Your code should takes two inputs: an array representing an image of size

Implement convolving a kernel with an image in code with python .Your code should takes two inputs: an array representing an image of size M N and an array representing a kernel of size k X k where k is odd. Your code should pad your input image with the appropriate amount of zeros, perform the convolution, and output the resulting image. (a) Use your code on image1(Any photo) using a box kernel, defined as w(s, t) = =-2/2 k of size k X k for k = 3, 21, and 41. Show each resulting image. What is the impact of using zero padding? (b) Using a Gaussian kernel, defined as WG(s, t) = = 1 22 s +1 e 20 of size 43 43 where o = 2,7,and 15. Show each resulting image. What is the impact of using zero padding?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
