MATLAB Can I know the reconstruction of phase shift interferometry in Matlab

AI Thread Summary
The discussion focuses on reconstructing phase shift interferometry (PSI) using the angular spectrum method in MATLAB. The user shares their MATLAB code, detailing the simulation of light propagation, interference at the hologram plane, and the reconstruction process. They express concerns about the high mean squared error (MSE) in their reconstruction results and seek assistance in verifying the correctness of their method. Participants encourage sharing additional research and previous MATLAB work to provide better guidance. The conversation highlights the complexity of the project and the need for collaborative problem-solving in advanced computational techniques.
Leena Thomas
Messages
3
Reaction score
0
I want to know the reconstruction of phase shift interferometry by angular spectrum method in matlab
 
Physics news on Phys.org
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?
 
I go through some papers on which hologram image is produced by PSI. So I think of its reconstruction.
 
Matlab:
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 offU1 = 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:
Back
Top