Cognex Interview Question

Write code to do a convolution in your language choice.