Reputation: 1
I am trying to unwrap the interference pattern that I got from the interferometre. However, the first step would be to wrap the phase, because I just got an image (intensity). I cannot post the image, but it is concentric rings with some noise. I have followed the steps from the Takeda paper, that are basically:
The first problem is that the third step should be applied to the first frequency order of the FFT, but MATLAB only gives me the 0 order in the FFT.
clear all
I3=im2double(imread('Int4.bmp'));
N=1024;
w=hann(N); % hanning window
m1 = w(:)*w(:).' ; %' Create 2D window
I1=I3(:,129:1152).*m1;
D = fftshift(fft2(fftshift(I1)));%,2048,2048));
% Create Butterworth filter:
nx=512; ny=512; d1=10;
fftI=D(1:1023,1:1023);
n=2;
filter3 = ones(2*nx-1,2*ny-1);
for i = 1:2*nx-1
for j =1:2*ny-1
dist = ((i-(nx+1))^2 + (j-(ny+1))^2)^.5;
filter3(i,j) = (1/(1 + (dist/d1)^(2*n))).*filter3(i,j);
end
end
% Update image with passed frequencies.
filtered_image = ifftshift(ifft2(ifftshift(filter3.*fftI),N-1,N-1)) ;
I would appreciate any suggestion or comments.
Thank you very much!!
Upvotes: 0
Views: 745