91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

這是我自己編寫的matlab運(yùn)動(dòng)模糊盲復(fù)原程序

資源截圖

代碼片段和文件信息

function?[THETAS]?=?EstAngle(ifbl)
%Function?to?estimate?blur?angle
%Inputs:?ifbl?expertstatus
%Returns:?THETAS
%
%ifbl:??It?is?the?input?image.
%THETAS:?It?is?the?blur?angle.?The?angle?at?which?the?image?is?blurred.?It
%????????is?a?collection?of?possible?blur?angles.
%
%Example:
%???????[THETAS]?=?EstAngle(image?expertstatus?handle);
%???????This?call?takes?image?as?input?and?returns?a?group?of?blur?angle.

%No?of?steps?in?the?algorithm
steps?=?8;

%Number?of?estimates?required
noofest?=?10;

%Preprocessing
%Performing?Median?Filter?before?restoring?the?blurred?image
ifbl?=?medfilt2(abs(ifbl));

%We?have?to?convert?the?image?to?Cepstrum?domain
%This?is?how?we?represent?Cepstrum?Domain
%Cep(g(xy))?=?invFT{log(FT(g(xy)))}

%Converting?image?from?spatial?domain?to?frequency?domain
fbl?=?abs(fft2(ifbl));

%Performing?Log?Transform
lg?=?log(1+fbl);
lgpow?=?abs(lg).^2;

%Converting?to?cepstral?domain
lgcep?=?ifft2(lgpow);

%Finding?edges?in?image
BW?=?edge(lgcep);
BW?=?ifftshift(BW);

%Calling?hough?transform
h?=?Hough(BW);
siz?=?size(ifbl);
rl?=?ceil(sqrt(siz(1)^2+siz(2)^2));

%Finding?first?maximum?in?the?accumulator
maxi?=?0;
theta?=?0;
for?i?=?1:rl
????for?j?=?1:360
????????if?h(ij)>maxi
????????????maxi?=?h(ij);
????????????theta?=?j;
????????end
????end
end

%Storing?first?maximum?in?the?array
g?=?1;
maxarr(g)?=?theta;???
g?=?g?+?1;

%Saving?our?original?accumulator?array
h2?=?h;

%Iterating?10?times?to?find?10?highest?angle?values
for?p?=?1:(noofest-1)
????%Band?Elimination?the?region?of?+5?&?-5?degrees?of?the?maximum?angle
????%If?angle?is?between?0?and?5?????
????if?theta<=5
????????for?j?=?1:theta+5
????????????for?i?=?1:rl
????????????????h2(ij)=0;
????????????end
????????end

????????for?j?=?355:360
????????????for?i?=?1:rl
????????????????h2(ij)=0;
????????????end
????????end

????%If?angle?is?between?355?and?360?????
????elseif?theta>=355
????????for?j?=?theta-5:360
????????????for?i?=?1:rl
????????????????h2(ij)=0;
????????????end
????????end
????????for?j?=?1:360-theta
????????????for?i?=?1:rl
????????????????h2(ij)=0;
????????????end
????????end

????%For?any?other?angle????
????else
????????for?j?=?theta-5:theta+5
????????????for?i?=?1:rl
????????????????h2(ij)=0;
????????????end
????????end
????end

????%Finding?the?next?maximum
????maxi?=?0;
????theta?=?0;
????for?i?=?1:rl
????????for?j?=?1:360
????????????if?h2(ij)>maxi
????????????????maxi?=?h2(ij);
????????????????theta?=?j;
????????????????r1?=?i;
????????????end
????????end
????end

????%Storing?next?maximum?in?the?array
????maxarr(g)?=?theta;???
????g?=?g?+?1;
end

newarr?=?maxarr;
arrsiz?=?size(maxarr);

%Fitting?it?into?180?degrees
for?i?=?1:arrsiz(2)
????if?newarr(i)>180
????????newarr(i)?=?newarr(i)-180;
????end
end

%Possible?values?of?THETA
THETAS?=?newarr;

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件?????118886??2013-12-26?13:53??matlab運(yùn)動(dòng)模糊盲復(fù)原\20131226135258.jpg

?????文件???????2932??2013-12-25?16:15??matlab運(yùn)動(dòng)模糊盲復(fù)原\EstAngle.m

?????文件???????1838??2013-12-25?16:18??matlab運(yùn)動(dòng)模糊盲復(fù)原\EstLen.m

?????文件????????828??2013-12-22?16:20??matlab運(yùn)動(dòng)模糊盲復(fù)原\Hough.m

?????文件????????512??2013-12-26?20:45??matlab運(yùn)動(dòng)模糊盲復(fù)原\main.m

?????目錄??????????0??2013-12-26?20:43??matlab運(yùn)動(dòng)模糊盲復(fù)原

-----------?---------??----------?-----??----

???????????????124996????????????????????6


評論

共有 條評論