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

📄 tai_daopu.m

📁 对图像加模糊
💻 M
字号:
I=imread('coins.png');
I=im2double(I);
figure
imshow(I);
I=im2double(I);
len=15;
theta=30;
PSF=fspecial('motion',len,theta);
I1=imfilter(I,PSF,'circular');
figure
imshow(I1);
I2=fft2(I1);
I3=abs(I2);
I4=abs((log10(1+I3))).^2;
I5=ifft2(I4);
figure
plot(I4);
I5=fftshift(I5);
minmum=min(I5(:));
I6=abs(I5);
R=[];
C=[];
[R,C]=find(I5==minmum);
[rows,cols]=size(I5);
row1s=rows;
col1s=cols;
m=0.5;
if(length(R)==1&&length(C)==1)
    R(2)=0;
    C(2)=0;
    row1s=0;
    col1s=0;
    m=0;
end
Retrive_len=(1-m)*sqrt((R(1)-rows/2)^2+(C(1)-cols/2)^2 )+m*sqrt((R(2)-row1s/2)^2+(C(2)-col1s/2)^2 );
Retrive_theta=(1-m)*acot(abs(C(1)-cols/2-1)/abs(R(1)-rows/2-1))*180/pi+m*acot(abs(C(1)-cols/2-1)/abs(R(1)-rows/2-1))*180/pi;
ipsf=fspecial('motion',Retrive_len,Retrive_theta);
I7=deconvlucy(I1,ipsf,10);
figure
imshow(I7);
%I7=deconvreg(I1,ipsf);
%figure
%imshow(I7);
%I7=deconvwnr(I1,ipsf);
%figure
%imshow(I7);








⌨️ 快捷键说明

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