I have done the Matlab code like this:
And also did some work in Java, but the pattern is different from each other.
I will be very appreciate if you guys can help
Best regards
Code:
k=double(imread('testHologram.bmp'))/255*2*pi;
Mtheta=3/4*pi;
Mphi=pi/6000;
wl = 522e-9;
[x,y]=meshgrid(-960*p:p:959*p,540*p:-p:-539*p);
xm=x*cos(Mtheta)+y*sin(Mtheta);
ym=-x*sin(Mtheta)+y*cos(Mtheta);
wave=exp(j*2*pi/wl*sin(Mphi)*xm);
khologram = exp(j*k).*wave;
phase1=angle(khologram)+pi;
% Hologram
kkhologram=phase1/pi/2;
imshow(kkhologram,'Parent',handles.axes2);
And also did some work in Java, but the pattern is different from each other.
I will be very appreciate if you guys can help
Best regards