What would be the outcome of the convolution of two images? Lena


Mask




I have written a C# code which produces the following output.




Is my output correct?
Am I padding in the correct way?
You can use MATLAB to get the 2D convolution of these images. Before you do so, you'll want to convert image 2 to grayscale and convert both to double.

The result has a very large range, so I normalized the second image.

lena = im2double(imread('lena.jpg'));
color = im2double(rgb2gray(imread('color.jpg')));
out = conv2(lena, color./sum(sum(color)));




If you happen to be interested in blending images together, you might want to check out this paper.