jiangkuo107
2009-05-08, 21:10
各位高人,我的毕业设计的题目是横向剪切干涉一维数据的处理算法研究,我对MATLAB一窍不通,到现在只做了一点点啊。我现在做的事先仿真出波面,然后剪切,在处理得到四副横向剪切干涉图,我已经做出来,下面要进行对干涉图处理,返回来得到一维数据,就是干涉采样位相处理曲线拟合,希望哪位高手可以帮帮我给我一些提示,有重大帮助者,我会有重礼答谢。我的邮箱[email protected]
下面的程序是我目前做的程度:
clear
clc
lamda=0.6328*10^-3;
x=linspace(-10,10,500);
% x=-10:0.1:10;
[vv nn]=size(x);
[x,y]=meshgrid(x,x);
c=1/100;
k=-4;
%asphere
x1=(c*(x.^2+y.^2))./(1+(1-(1+k)*c^2*(x.^2+y.^2)).^(1/2));
% x1=x1-min(min(x1));
%sphere
k=0;x2=(c*(x.^2+y.^2))./(1+(1-(1+k)*c^2*(x.^2+y.^2)).^(1/2));
% x2=x2-min(min(x2));
% xxx=2*(x2-x1);
x2=x2-x1;
xxx=2*x2;
xxx=xxx-min(min(xxx));
ff=zeros(nn);
ff1=zeros(nn);
fn=x.^2+y.^2;
for i=1:nn
for j=1:nn
if fn(i,j)<=(10*0.8)^2
ff(i,j)=1;
end
end
end
x3=2*pi*xxx/lamda;
I=1+cos(x3);
I=I.*ff;
% figure(4),
% imshow(I,[])
shear=nn*0.8*0.1;
ff1(:,1:nn-shear)=ff(:,shear+1:nn);
ffx=ff & ff1;
ffx1=ff | ff1;
% ffxx=ffx1-ffx;
%最大偏离量
pv1=x2.*ff;
pv=(max(max(pv1))-min(min(pv1)))/lamda
x1=xxx.*ff;
%xian shi bo cha
% figure(9),mesh(x,y,x1/(2*lamda))
%direct x shearing
xs=zeros(nn);
xs(:,1:nn-shear)=x1(:,shear+1:nn);
xi=(x1-xs)*2*pi/lamda;
xs1=cos(xi).*ffx+ffx1*1;
figure(1),imshow(xs1,[])
xi=(x1-xs)*2*pi/lamda+pi/2;
xs2=cos(xi).*ffx+ffx1*1;
figure(2),imshow(xs2,[])
xi=(x1-xs)*2*pi/lamda+pi;
xs3=cos(xi).*ffx+ffx1*1;
figure(3),imshow(xs3,[])
xi=(x1-xs)*2*pi/lamda+3*pi/2;
xs4=cos(xi).*ffx+ffx1*1;
xsgraph=[xs1 xs2;xs3 xs4];
% figure(1),imshow(xsgraph,[])
figure(4),imshow(xs4,[])
下面的程序是我目前做的程度:
clear
clc
lamda=0.6328*10^-3;
x=linspace(-10,10,500);
% x=-10:0.1:10;
[vv nn]=size(x);
[x,y]=meshgrid(x,x);
c=1/100;
k=-4;
%asphere
x1=(c*(x.^2+y.^2))./(1+(1-(1+k)*c^2*(x.^2+y.^2)).^(1/2));
% x1=x1-min(min(x1));
%sphere
k=0;x2=(c*(x.^2+y.^2))./(1+(1-(1+k)*c^2*(x.^2+y.^2)).^(1/2));
% x2=x2-min(min(x2));
% xxx=2*(x2-x1);
x2=x2-x1;
xxx=2*x2;
xxx=xxx-min(min(xxx));
ff=zeros(nn);
ff1=zeros(nn);
fn=x.^2+y.^2;
for i=1:nn
for j=1:nn
if fn(i,j)<=(10*0.8)^2
ff(i,j)=1;
end
end
end
x3=2*pi*xxx/lamda;
I=1+cos(x3);
I=I.*ff;
% figure(4),
% imshow(I,[])
shear=nn*0.8*0.1;
ff1(:,1:nn-shear)=ff(:,shear+1:nn);
ffx=ff & ff1;
ffx1=ff | ff1;
% ffxx=ffx1-ffx;
%最大偏离量
pv1=x2.*ff;
pv=(max(max(pv1))-min(min(pv1)))/lamda
x1=xxx.*ff;
%xian shi bo cha
% figure(9),mesh(x,y,x1/(2*lamda))
%direct x shearing
xs=zeros(nn);
xs(:,1:nn-shear)=x1(:,shear+1:nn);
xi=(x1-xs)*2*pi/lamda;
xs1=cos(xi).*ffx+ffx1*1;
figure(1),imshow(xs1,[])
xi=(x1-xs)*2*pi/lamda+pi/2;
xs2=cos(xi).*ffx+ffx1*1;
figure(2),imshow(xs2,[])
xi=(x1-xs)*2*pi/lamda+pi;
xs3=cos(xi).*ffx+ffx1*1;
figure(3),imshow(xs3,[])
xi=(x1-xs)*2*pi/lamda+3*pi/2;
xs4=cos(xi).*ffx+ffx1*1;
xsgraph=[xs1 xs2;xs3 xs4];
% figure(1),imshow(xsgraph,[])
figure(4),imshow(xs4,[])