资源简介

是国外大牛编写的,对图像进行二维反卷积恢复代码,该代码主要针对图像的失焦模糊。

资源截图

代码片段和文件信息

function [x]=deconvL2(Ifilt1wemax_it)
%note: size(filt1) is expected to be odd in both dimensions 

if (~exist(‘max_it‘‘var‘))
   max_it=200;
end

[nm]=size(I);




hfs1_x1=floor((size(filt12)-1)/2);
hfs1_x2=ceil((size(filt12)-1)/2);
hfs1_y1=floor((size(filt11)-1)/2);
hfs1_y2=ceil((size(filt11)-1)/2);
shifts1=[-hfs1_x1  hfs1_x2  -hfs1_y1  hfs1_y2];

hfs_x1=hfs1_x1;
hfs_x2=hfs1_x2;
hfs_y1=hfs1_y1;
hfs_y2=hfs1_y2;


m=m+hfs_x1+hfs_x2;
n=n+hfs_y1+hfs_y2;
N=m*n;
mask=zeros(nm);
mask(hfs_y1+1:n-hfs_y2hfs_x1+1:m-hfs_x2)=1;



tI=I;
I=zeros(nm);
I(hfs_y1+1:n-hfs_y2hfs_x1+1:m-hfs_x2)=tI; 
x=tI([ones(1hfs_y1)1:endend*ones(1hfs_y2)][ones(1hfs_x1)1:endend*ones(1hfs_x2)]);



b=conv2(x.*maskfilt1‘same‘);



dxf=[1 -1];
dyf=[1;-1];


if (max(size(filt1)<25))
  Ax=conv2(conv2(xf

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-26 09:38  DeconvolutionCode\
     文件        1858  2007-04-29 17:23  DeconvolutionCode\deconvL2.m
     文件         474  2007-04-29 17:23  DeconvolutionCode\deconvL2_frequency.m
     文件        2511  2007-04-29 11:59  DeconvolutionCode\deconvL2_w.m
     文件        1705  2007-07-02 20:56  DeconvolutionCode\deconvSps.m
     文件         874  2007-07-02 20:58  DeconvolutionCode\demo.m
     文件      714852  2007-04-29 12:23  DeconvolutionCode\demo_inp.mat
     文件         448  2007-04-29 12:06  DeconvolutionCode\fftconv.m

评论

共有 条评论