2D image convolution is like using a magic stencil to look at small parts of an image and create a new one by highlighting certain…