Why is the square of an image not equvalent to taking the autoconvolution of an image in fourier space?

42 Views Asked by At

Al right I know that in order to multiply in the normal domain I have to take the convolution in Fourier domain but when I do so in matlab and invert the result then I come up with nothing but a lot of noise (and a lot of complex numbers), the code I was using to do this was the following:

squaredImage=image.*image; %what I actually want 
fourierImage=fft2(image);
convolutionFourierImage=conv2(fourierImage,fourierImage);
notSquaredImage=ifft2(convolutionFourierImage); %this becomes a mess

Any idea why this code is not working?