# MATLAB代做|FPGA代做--Tikhonov算法的仿真

### 时间：2018-10-3 0:17:31 点击：

核心提示：matlab代做，FPGA代做，淘宝，专业代做MATLAB、FPGA博士/硕士/本科课题仿真、项目仿真、Coursework、Assignment QQ: 1224848052...

QQ: 1224848052

MATLAB程序下载——一基于MATLAB的Tikhonov算法的仿真。

% Algorithm for the Tikhonov model of image inpainting, using a least

% squares approach (as opposed to iterative approach)

% Input: I = original clean image

%        u0 = corrupted image

%        mask = set of data without missing intensities

%

% Output: u = TV restored image

%         SNR = signal-to-noise ratio

% initialization

[n,m]=size(u0);

u0=u0(:);

nm=n*m;

k=isnan(u0(:));

% list the nodes which are known, and which will be interpolated

notinD = find(k);

inD = find(~k);

[nr,nc]=ind2sub([n,m],notinD);

notinD=[notinD,nr,nc];

% build sparse matrix approximating Laplacian for every element in u0.

% compute finite difference for second partials on row variable

[i,j]=ndgrid(2:(n-1),1:m);

indices=i(:)+(j(:)-1)*n;

laplacian=sparse(repmat(indices,1,3),[indices-1,indices,indices+1], ...

repmat([1 -2 1],(n-2)*m,1),n*m,n*m);

% now second partials on column variable

[i,j] = ndgrid(1:n,2:(m-1));

indices   = i(:)+(j(:)-1)*n;

laplacian=laplacian+sparse(repmat(indices,1,3),[indices-n,indices,indices+n], ...

repmat([1 -2 1],n*(m-2),1),nm,nm);

% eliminate knowns

rhs=-laplacian(:,inD)*u0(inD);

k=find(any(laplacian(:,notinD),2));

% and solve...

u=u0;

u(notinD(:,1))=laplacian(k,notinD(:,1))\rhs(k);

u=reshape(u,n,m);

% calculate SNR

num = var(I(:), 1);

denom = mean((I(:)-u(:)).^2);

SNR = 10*log10(num/denom);

-------------------------------------------------------------------------------------

matlab有偿代做,matlab留学生作业代做，matlab留学生代做，matlab项目代做，FPGA项目代做

QQ:1224848052

QQ ：1224848052

• 百度搜索
• 查阅资料过程中
• 论坛发现
• 百度贴吧发现
• 朋友介绍
• 没有相关文章
• 大名：
• 内容：