⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctart.m

📁 3D--ART重建
💻 M
字号:
%--ART算法迭代格式--good
%function F=CTART(p,W,N,I,J)
tic
%p = IMNOISE(p,'gaussian',0,0.000001);%--SNR  30dB
%p = IMNOISE(p,'speckle',0.03);  %--SNR  20dB
%p=p.*(1+5./100.*randn(size(p)));
P=p(1:I);
F=ones(J,1).*0.4;

%F=Z(1:J);
%F=0.5*F';

for k=0:50*I
     i_k=mod(k,I)+1;
    if sum(W(i_k,:))~=0
       F=F+0.9*(P(i_k)-W(i_k,:)*F).*W(i_k,:)'/sum(W(i_k,:).^2);
 
    end
    for j=1:J
             if F(j)<0
              F(j)=0;
             end
         end
        
       avere(k+1)=sum(abs(Fs-F'))/(fsmax*J);
       maxe(k+1)=max(abs(Fs-F'))/fsmax;
       sqrte(k+1)=sqrt((Fs-F')*(Fs-F')'/fssum);
    
end
       Eaver=sum(abs(Fs-F'))/(fsmax*J)
       Emax=max(abs(Fs-F'))/fsmax
       Esqrt=sqrt((Fs-F')*(Fs-F')'/fssum)
%--重建图像
M=N;
F=reshape(F,N,M);
F=F';

%x=-0.5:0.04:0.5;
%y=-0.5:0.04:0.5;
y=-2:0.16:2;
x=-2:0.16:2;

[X,Y]=meshgrid(x,y);
[X,Y]=meshgrid(x,y);
figure;
mesh(F)
mesh(X,Y,F);
%--误差
r=0;
for c=1:I:50*I
   r=r+1;
   avere1(r)=avere(c);
    maxe1(r)=maxe(c);
    sqrte1(r)=sqrte(c);
end
    
figure;
plot(avere1);
figure;
plot(maxe1);
figure;
plot(sqrte1);

toc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -