資源簡(jiǎn)介
FFT用于圖像快速卷積,里面包含詳細(xì)地文檔,C++,python,matlab三種語(yǔ)言編寫,適合不同的編程人員

代碼片段和文件信息
function?y?=?conv_fft2(x?m?shape)
%CONV_FFT2?Two?dimensional?convolution?via?the?FFT.
%???Y?=?CONV_FFT2(X?M)?performs?the?2-D?convolution?of?matrices?X?and?M.
%???If?[mxnx]?=?size(X)?and?[mmnm]?=?size(M)?then?size(Y)?=
%???[mx+mm-1nx+nm-1].?Values?near?the?boundaries?of?the?output?array?are
%???calculated?as?if?X?was?surrounded?by?a?border?of?zero?values.
%
%???Y?=?CONV_FFT2(X?M?SHAPE)?where?SHAPE?is?a?string?returns?a
%???subsection?of?the?2-D?convolution?with?size?specified?by?SHAPE:
%
%???????‘full‘????-?(default)?returns?the?full?2-D?convolution
%???????‘same‘????-?returns?the?central?part?of?the?convolution
%???????????????????that?is?the?same?size?as?X?(using?zero?padding)
%???????‘valid‘???-?returns?only?those?parts?of?the?convolution
%???????????????????that?are?computed?without?the?zero-padded
%???????????????????edges?size(Y)?=?[mx-mm+1nx-nm+1]?when
%???????????????????size(X)?>?size(M)
%???????‘wrap‘????-?as?for?‘same‘?except?that?instead?of?using
%???????????????????zero-padding?the?input?X?is?taken?to?wrap?round?as
%???????????????????on?a?toroid.
%???????‘reflect‘?-?as?for?‘same‘?except?that?instead?of?using
%???????????????????zero-padding?the?input?X?is?taken?to?be?reflected
%???????????????????at?its?boundaries.
%
%???For?shape?options?‘full‘?‘same‘?and?‘valid‘?this?function?should
%???return?the?same?result?as?CONV2?to?within?a?small?tolerance.?For?all
%???shape?options?this?function?should?return?the?same?result?as?CONVOLVE2
%???(available?via?the?MATLAB?Central?File?Exchange)?with?no?TOL?argument
%???to?within?a?small?tolerance.
%
%???CONV_FFT2?uses?multiplication?in?the?frequency?domain?to?compute?the
%???convolution.?It?may?be?faster?than?CONV2?and?CONVOLVE2?for?masks?above
%???a?certain?size.?This?should?be?checked?experimentally?for?any?given
%???application?and?system.
%
%???See?also?CONV2?CONVOLVE2?FILTER2.
%?Copyright?David?Young?April?2011
error(nargchk(23nargin‘struct‘));
if?nargin?3
????shape?=?‘full‘;????%?shape?default?as?for?CONV2
end;
[x?m?fsize]?=?padarrays(x?m?shape);
%?no?need?to?trap?case?of?real?x?and?m?-?fft2?handles?efficiently
y?=?ifft2(fft2(x)?.*?fft2(m));???%?central?operation?basic?form
%?trim?to?correct?output?size
if?~isequal(fsize?size(y))
????y?=?y(1:fsize(1)?1:fsize(2));
end
end
function?[x?m?fsize]?=?padarrays(x?m?shape)
%?Pad?arrays?to?make?them?the?same?size?and?allow?for?boundary?effects
xsize?=?size(x);
msize?=?size(m);
switch?shape
????
????case?‘wrap‘
????????fsize?=?xsize;
????????%?ensure?x?no?smaller?than?m
????????if?any(msize?>?xsize)??&&?~isempty(x)
????????????x?=?repmat(x?ceil(msize?./?size(x)));
????????????xsize?=?size(x);
????????end
????????%?pad?m?with?zeros
????????if?any(msize?????????????m?=?exindex(m?1:xsize(1)?1:xsize(2)?{0});
????????end
????????%?recentre?m?so?that?y(11)?corresponds?to?mask?cen
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????2991924??2014-08-01?22:54??CFFTW\CFFTWWrapper.zip
?????文件??????12123??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation.htm
?????文件???????6620??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\doctools.js
?????文件??????40219??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\ga.js
?????文件??????93868??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\jquery.js
?????文件???????3932??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\pygments.css
?????文件???????6086??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\sphinxdoc.css
?????文件???????4621??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\theano_logo_allblue_200x46.png
?????文件??????12140??2014-08-02?23:11??CFFTW\conv?–?Convolution?—?Theano?0.6?documentation_files\underscore.js
?????文件???????4730??2014-02-12?13:27??CFFTW\conv_fft2\conv_fft2.m
?????文件???????9835??2014-02-12?13:27??CFFTW\conv_fft2\exindex.m
?????文件???????1343??2014-02-12?13:27??CFFTW\conv_fft2\license.txt
?????文件??????35623??2014-08-02?22:52??CFFTW\documentation.html
?????文件?????861581??2014-08-02?22:15??CFFTW\precompiledFFTW.zip
?????文件??????69503??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2.htm
?????文件???????3377??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\badge_only.css
?????文件??????10484??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\bootstrap-astropy.css
?????文件???????6686??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\doctools.js
?????文件??????40219??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\ga.js
?????文件??????83611??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\jquery-2.0.3.min.js
?????文件???????7199??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\jquery-migrate-1.2.1.min.js
?????文件???????3932??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\pygments.css
?????文件????????212??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\readthedocs-doc-em
?????文件???????9146??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\readthedocs-doc-em
?????文件???????4971??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\sidebar.js
?????文件??????12140??2014-08-02?23:02??CFFTW\python\astropy.nddata.convolution.convolve?—?Astropy?v0.2_files\underscore.js
?????文件??????27668??2014-08-02?23:03??CFFTW\python\convolve_fft?—?Astropy?v0.2.htm
?????文件???????3377??2014-08-02?23:03??CFFTW\python\convolve_fft?—?Astropy?v0.2_files\badge_only.css
?????文件??????10484??2014-08-02?23:03??CFFTW\python\convolve_fft?—?Astropy?v0.2_files\bootstrap-astropy.css
?????文件???????6686??2014-08-02?23:03??CFFTW\python\convolve_fft?—?Astropy?v0.2_files\doctools.js
............此處省略21個(gè)文件信息
評(píng)論
共有 條評(píng)論