From: Jenny Sokolovsky on 1 May 2010 15:42 Hi, I want to realize the 1D Fourier Transform Profilometry based on the article of Takeda: "Spatial-carrier fringe-pattern analysis and its applications to precision interferometry and profilometry: An overview". Assuming that the signal has the next form: g(x,y)=a(x,y)+b(x,y)cos(2*pi*f0*x+phase(x,y)) the purpose is to extract the phase(x,y). The steps are: 1. FFT => G(fx,y)=A(fx,y)+C(fx-f0,y)+C*(-(f+f0),y); when C is FT of c(x,y)=0.5b(x,y)ep(i*phase(x,y)) 2. Filter out C(fx,y): C(fx, y) = H(fx, y)G(fx +fo, Y). when H(fx,y)=sinc(pi*delta_x*fx), delta_x=1/f0 4. IFFT on C(fx,y)=> c(x,y) =(l/2)b(x,y)exp[i*phase(x,y)] 5. Phase extraction: using log or arctan(real/image) 6. phase unwrapping The problem is that after step 5, the wrapped phase does not look like expected (is not wrapped and doesn't fit the height profile). Can anybody explain me, where is my mistake? Thanks a lot. The code is: % 1D - FFT =>G(fx) G=fftshift(fft(g)); Fs=100; %sampling N=length(G); % this part of the code generates frequency axis if mod(N,2)==0 k=-N/2:N/2-1; % N even else k=-(N-1)/2:(N-1)/2; % N odd end T=N/Fs; X_freq=k/T; % frequency axis %%G(fx-f0) f0= 6; %example of f0 X_freq_f0=X_freq+f0; % H(fx) delta_x=1/f0; sinc_argument=pi*delta_x*(X_freq_f0); H=sinc(sinc_argument); % C(fx)=G(fx-f0)H(fx) C_freq=H.*y_last_fft_norm_shifted; % IFFT G_ifft=ifft(ifftshift(C_freq)); % phase extraction using arctan(real/imag) G_ifft_real=real(G_ifft); G_ifft_imag=imag(G_ifft); phase=atan(G_ifft_real./G_ifft_imag); phase_unwrapped=unwrap(phase); Thanks J
|
Pages: 1 Prev: parallel computing on a six-core local computer Next: Grib2 reader |