91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2022-11-30
  • 語言: Matlab
  • 標簽: bregman??cs??

資源簡介

bregman 恢復算法,可以恢復一維,二維的圖像等信號,不過具體公式請自己算,根據bregman的推導就可以算,很簡單!

資源截圖

代碼片段和文件信息

function?[xx_wtimesnrsnr_loop]=SplitBregmanCosparse(yAOmegaparams)%?use?in?image
%The?function?solves?problem:
%?????????????????????????????sol=argmin_x||W.*Omega*x||_1??s.t.
%?????????????????????????????||y-Ax||_2<=epsilon
%Using?Split?Bregman?to?solve?this?problem?by?convert?into?unconstrainted
%form:
%????????????????sol=argmin_x||W.*Omega*x||_1+mu/2*||y-Ax||_2^2
%reference?to?BregmanCookbook?chapter5
%input:?y?is?the?mixing?signalM*T
%???????A?is?the?mixing?matrixM*Nhere?it?is?a?eye?matrix
%???????Omega?is?the?analysis?operator?
%???????params.mu?is?the?fidelity?term‘s?weight?param?in?the?objective
%???????params.it?is?the?max?number?ot?iteration?of?SB?algorithm
%???????params.tol?is?about?the?stopping?criterion?below:
%???????norm(sol(:)-sol_pre(:)1)/norm(sol_pre(:)1)>tol
%???????params.lambda?is?the?penalty?function?weight?param?in?iteration
%
%output:?sol?is?the?solution?of?the?problem?use?Split?Bregman?algorithm
%????????sol_w?is?the?solution?of?the?problem?use?weighted?Split?Bregman?algorithm
??
%initiation
mu=params.mu;
lambda_1=params.lambda_1;
lambda_2=params.lambda_2;
it_SB=params.it_SB;
tol_SB=params.tol_SB;
if?isfield(params‘W_method‘)??%如果符合,返回邏輯1.
???W_method=params.W_method;
else??????????????????????????%否則,其他.
???W_method=‘W1‘;
end
%初始化
epsilon=10;
[MN]=size(A);
sb=size(y2);%?#?of?sampling?bins
u=zeros(size(A2)sb);
d=zeros(size(Omega*u));
b=zeros(size(Omega*u));
temp1=inv(mu*A‘*A+lambda_1*Omega‘*Omega);
temp2=mu*A‘*y;
%迭代???更新順序:u-d-b.
K=0;?T=0;
weights=1;
x_pre=u;
it_T=100;
while?T????T=T+1;
????tic;
????while?K????????K=K+1;
????????u_pre=u;
????????if?isfield(params‘x_t‘)?&&?T==2
????????????x_t=params.x_t;
????????????snr_loop(K)=20*log10(norm(x_t)/(norm(u_pre-x_t)));
????????end
????????u=temp1*(temp2+lambda

評論

共有 條評論