# Edge effects in 2D fourier transform?

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?

UPDATE

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;

fourier3 = fourier2;
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);


PROBABLY UNDERSTOOD

This is from table (on which fruit lays), not from picture edges.

-
Are you applying the FT-filtering-IFT process to each RGB channel separately? I ask because my first response in looking at the before and after images is that something has been done wrong in software. – AnonSubmitter85 Jun 9 '13 at 9:31
Please any expected my errors! Yes, I did fft2, see my code update. – Suzan Cioc Jun 9 '13 at 10:12
Sorry but I don't have time to look at your code in detail. I just did a quick FT-zero-IFT on a copy of the image you posted and it looks nothing like your result. I'd check what applycform() is doing to your data. What you should see when you just remove the higher frequency components is a general smoothing. There will be some Gibbs effects from a hard edge on the filter, but nothing like the effects in the your 'after' image. – AnonSubmitter85 Jun 9 '13 at 10:22
I did not zero, I did some filtering with fourier3(1+padding1:end-padding1,1+padding2:end-padding2,:)=0;, i.e. turned to zero some part of spectrum – Suzan Cioc Jun 9 '13 at 11:02