您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

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

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

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

matlab代做FPGA代做淘宝专业代做MATLABFPGA博士/硕士/本科项目仿真CourseworkAssignment

QQ: 1224848052

资源简介:

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

function [u,SNR] = tik_inpaint(I,u0,mask)


% 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;

u0(mask == 1) = NaN;

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);

   

下载 

解压密码均为:QQ1224848052 

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

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

QQ:1224848052

联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:Tikhonov算法 来源:Tikhonov算法
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做(www.hslogic.com) © 2018 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment