clc
clear all
close all
% 设定光栅大小
M=512;
N=512;
s1=1:M;
s2=1:N;
[x,y]=meshgrid(s2,s1);
%
% M=512;
% N=512;
s1=512:1023;
s2=512:1023;
[z,t]=meshgrid(s2,s1);
% [i,o]=[x,y]+[z+t];
i=x+z;
% 设定光栅周期
p=15;
f=1/p;
% 系统结构参数
l=300;
d=100;
%%%%%%%%%%%%%%%%%%%%生成参考面条纹%%%%%%%%%%%%%%%%%%%
a0=0.5;%%%%%%%%%%%%%%%%%投影系数
b0=0.5;%%%%%%%%%%%%%%%%%投影系数
phh=2*pi/5;%%%%%%%%设定条纹相移量
I01=a0+b0*cos(2*pi*f*i);%%%%%参考面采集到的第一帧条纹
imwrite(I01,'S01.bmp');
% H01=a0+b0*cos(2*pi*f*z);
% imwrite(H01,'H01.bmp');
% I02=a0+b0*cos(2*pi*f*x+phh);
% imwrite(I02,'S02.bmp');
% I03=a0+b0*cos(2*pi*f*x+2*phh);
% imwrite(I03,'S03.bmp');
% I04=a0+b0*cos(2*pi*f*x+3*phh);
% imwrite(I04,'S04.bmp');
% I05=a0+b0*cos(2*pi*f*x+4*phh);
% imwrite(I05,'S05.bmp');