I am taking the following image
then applying Fourier transform to it (discrete, FFT), then removing high frequencies from it and finally converting it back to image.
The result is following
There are obvious rectangle areas in the picture.
My question is an origin of these areas.
Are they come from the nature of discreteness or 2-dimensionality of transform? Or this is the effect of the edges?
There are 2 facts saying in favor of second point of view:
1) There are no any diagonal waves on the picture (should it be any)?
2) There are transitions, do not associated with any picture feature (A)
There are also facts in favor of first point of view:
2) There are transitions, associated with picture features (B)
So, what is correct interpretation? And if there are some edge effects, then how to avoid them?
Is it possible to "fit" spectral components so as if there are no information about target function outside of a region? I.e. not assuming function is zero there or has some other value?
My matlab code
rgb1=imread('..\FruitSample.jpg'); original1 = applycform(rgb1, makecform('srgb2lab')); original1_L = original1(:,:,1); original1_a = original1(:,:,2); original1_b = original1(:,:,3); rgb1=applycform(original1, makecform('lab2srgb')); subplot(5,4,1); imshow(rgb1); subplot(5,4,2); imshow(original1_L); subplot(5,4,3); imshow(original1_a); subplot(5,4,4); imshow(original1_b); fourier2 = fft2(original1); original2 = uint8(real(ifft2(fourier2))); original2_L = original2(:,:,1); original2_a = original2(:,:,2); original2_b = original2(:,:,3); rgb2 = applycform(original2, makecform('lab2srgb')); subplot(5,4,5); imshow(rgb2); subplot(5,4,6); imshow(original2_L); subplot(5,4,7); imshow(original2_a); subplot(5,4,8); imshow(original2_b); %thresold = 10; %padding1 = floor(size(fourier2,1)/thresold); %padding2 = floor(size(fourier2,2)/thresold); padding1 = 1; padding2 = 1; fourier3 = fourier2; fourier3(1+padding1:end-padding1,1+padding2:end-padding2,:)=0; original3 = uint8(real(ifft2(fourier3))); original3_L = original3(:,:,1); original3_a = original3(:,:,2); original3_b = original3(:,:,3); rgb3 = applycform(original3, makecform('lab2srgb')); subplot(5,4,9); imshow(rgb3); subplot(5,4,10); imshow(original3_L); subplot(5,4,11); imshow(original3_a); subplot(5,4,12); imshow(original3_b);
This is from table (on which fruit lays), not from picture edges.