This code calculates 4-steps phase shifting digital holography.
c1.
Load(
"lena1024.bmp",
"mandrill1024.bmp");
c2=c1;
c3=c1;
c4=c1;
c1+=c1.
Polar(1.0f, 0.0f);
c2+=c2.Polar(1.0f, CWO_PI/2);
c3+=c3.Polar(1.0f, CWO_PI);
c4+=c4.Polar(1.0f, 3.0f/2.0f*CWO_PI);
c1-=c3;
c2-=c4;
c3.Diffract(-0.1);
shifting digital holography