Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am taking the following image

enter image description here

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

enter image description here

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;
%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);

PROBABLY UNDERSTOOD

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

share|improve this question
    
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
1  
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

1 Answer 1

The problem that you are talking about is called ringing effect. It is the correspondance of leakage effect in one dimension and occurs due to the circle window of ideal filtering.

Solution: use another window other than the ideal one. For example Butterworth or Gaussian lowpass filtering will do the same job as you mentioned but using a smooth window. This will remove the ringing effects but will introduce a bit more blurr and less quality filtering. i.e., the high frequencies will not be perfectly suppressed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.