` i have to code convolution of the two image(the greyimage output and the image i posted)(once in space domain and again in frequency domain using fft2 and ifft2)there is no error in the code but it didn't give proper output...please let me know where i'm going wrong in the coding... x= 1:256;y=1:256; [p,q]=freqspace(256); [X,Y]=meshgrid(p,q); R=(X.^2 + Y.^2); Lambda=10*10^-9; dis=4*10^-2; F = (exp(i.*pi.*R))./(Lambda.*dis); grayImage = imag(F); mesh(grayImage); imshow(grayImage, []); colormap(gray(256)); A=imread('image.jpg'); R=A(:,:,1); G=A(:,:,2); B=A(:,:,3); igray=rgb2gray(A); A1=im2double(igray); I=conv2(A1,grayImage); figure,imshow(I,'InitialMagnification','fit');`

# MATLAB: Convolution of the two image

convolutionimage processingImage Processing Toolbox

## Best Answer