資源簡介
用matlab實現散焦模糊圖像的參數估計,并運用Lucy法復原圖像,效果不錯
代碼片段和文件信息
clc
clear
%a=rgb2gray(imread(‘terra.jpg‘));
a=imread(‘H:\135.jpg‘);
h1=fspecial(‘disk‘3.8);
a=imfilter(ah1‘conv‘‘replicate‘);
a1=im2uint8(mat2gray((log(1+abs(fftshift(fft2(a)))))));
hc=fspecial(‘gaussian‘[44]5);
A1=imfilter(a1hc‘conv‘‘replicate‘);
for?n=1:256
????p(n)=A1(nn);
end;
estimate_h1=fspecial(‘disk‘3.8);
edge_W1=edgetaper(aestimate_h1);
estimate_W1=deconvlucy(edge_W1estimate_h120);
figure;
subplot(331)imshow(a);
subplot(334)imshow(a1);
figure;
subplot(221)plot(p(129:256));
figure;
subplot(221)imshow(estimate_W1);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????85320??2008-05-10?09:53??136.JPG
?????文件????????595??2013-05-24?11:37??sanjiao.m
?????文件??????76571??2008-05-10?09:53??135.JPG
-----------?---------??----------?-----??----
???????????????162486????????????????????3
評論
共有 條評論