Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Can I know the reconstruction of phase shift interferometry in Matlab

  1. Nov 8, 2018 #1
    I want to know the reconstruction of phase shift interferometry by angular spectrum method in matlab
     
  2. jcsd
  3. Nov 8, 2018 #2

    berkeman

    User Avatar

    Staff: Mentor

    Welcome to the PF. :smile:

    What research and reading have you been doing so far on this? Can you post some links? What other work have you done in Matlab that may be of similar complexity?

    I did a Google search on your thread title, and got lots of useful hits. Please show us what you have done so far, to help us try to give you some help. Sounds like an interesting project. Is this for school? Or your work in an industrial lab?
     
  4. Nov 9, 2018 #3
    I go through some papers on which hologram image is produced by PSI. So I think of its reconstruction.
     
  5. Nov 10, 2018 #4
    Code (Matlab M):
    clear all; close all;

    I=imread('cameraman.tif', 'tif');
    % parameter setup
    M=256;
    deltax=0.001; % pixel pitch 0.001 cm (10 um)
    w=633*10^-8; % wavelength 633 nm
    z=25; % 25 cm, propagation distance
    delta=pi/2; % phase step (change it to show part b)
    %Step 1: Simulation of propagation using the ASM
    r=1:M;
    c=1:M;
    [C, R]=meshgrid(c, r);
    A0=fftshift(ifft2(fftshift(I)));
    deltaf=1/M/deltax;
    p=exp(-2i*pi*z.*((1/w)^2-((R-M/2-1).*deltaf).^2-((C-M/2-1).*deltaf).^2).^0.5);
    Az=A0.*p;
    EO=fftshift(fft2(fftshift(Az)));
    %Step 2: Interference at the hologram plane
    AV=(min(min(abs(EO)))+max(max(abs(EO))));
    % the amplitude of reference light
    % Recording of Four phase-shifting holograms
    I0=(EO+AV).*conj(EO+AV);
    I1=(EO+AV*exp(-1j*delta)).*conj(EO+AV*exp(-1j*delta));
    I2=(EO+AV*exp(-2j*delta)).*conj(EO+AV*exp(-2j*delta));
    I3=(EO+AV*exp(-3j*delta)).*conj(EO+AV*exp(-3j*delta));
    MAX=max(max([I0, I1, I2, I3]));
    figure(1);
    subplot(2,4,1);imshow(I);
    title('Original object')
    axis off
    figure(1)
    subplot(2,4,2)
    imshow(I0/MAX);
    axis off
    title('hologram 1')
    subplot(2,4,3)
    imshow(I1/MAX);
    axis off
    title('hologram 2')
    subplot(2,4,6)
    imshow(I2/MAX);
    axis off
    title('hologram 3')

    subplot(2,4,7)
    imshow(I3/MAX);
    axis off
    title('hologram 4')
    %Step 3: Reconstruction
    CH=(I0-I2)-1j*(I1-I3); % the complex hologram (4-step PSH)
    %A1=fftshift(ifft2(fftshift(CH)));
    %Az1=A1.*conj(p);
    %EI=fftshift(fft2(fftshift(Az1)));
    %EI=(EI.*conj(EI));
    %EI=EI/max(max(EI));
    %figure(1);
    %subplot(2,4,4)
    %imshow(EI);
    %title('Reconstructed image of 4-step PSH')
    %axis off


    U1 = ifft2(ifftshift(fftshift(fft2(CH)).*conj(p)));
    Iangular = (1/(16*pi)).*(U1.*conj(U1));
    EI=Iangular/max(max(Iangular));
    figure(1);
    subplot(2,4,4)
    imshow(EI);
    title('Reconstructed image of 4-step PSH')
    axis off

    s=PSNR(I,EI)
     

    I did reconstruction of PSI but MSE found to be a high value............ is the reconstruction method correct? please help me.
     
    Last edited by a moderator: Nov 10, 2018
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted