資源簡介
經典圖像融合算法, NSCT算法,為matlab 和 C++ 混合編譯,修改圖像地址即可方便使用

代碼片段和文件信息
/******************************************************************
*?atrousc.c?-??Written?by?Arthur?Cunha.?This?routine?builds?up?on?
*???????????????zconv2D_OS.c?written?by?Jason?Laska
*
*?Inputs:???x?-?A?2D?signal
*???????????h?-?2D?filter
*???????????m?-?separable?upsampling?matrix
*?????????
*?Outputs:??y?-?2D?result?of?convolution?with?filter?
*???????????upsampled?by?a?m?only?the?‘valid‘?part?is?returned.
*???????????Similar?to?conv2(xh‘valid‘)?where?h?is?the?upsampled
*???????????filter.
*??
*??????????
*
*?Usage:????y?=?zconv2D_O(xhm);
*
*?Notes:????This?function?does?not?actually?upsample?the?filter?
*???????????it?computes?the?convolution?as?if?the?filter?had?been?
*???????????upsampled.?This?is?the?ultimate?optimized?version.
*???????????Further?optimized?for?separable?(diagonal)?upsampling?matrices.
*
*?This?is?a?MEX-FILE?for?matlab
*
/********************************************************/
#include?“mex.h“
#include?
//Constants?for?matlab?interfacing
#define?OUT?????plhs[0]
#define?SIGNAL??prhs[0]?//flip?and?shift
#define?FILTER??prhs[1]?//stationary
#define?MMATRIX?prhs[2]
//MACRO?for?converting?positions?to?linear
#define?LINPOS(rowcolcollen)?(row*collen)+col
void?mexFunction(int?nlhs?mxArray?*plhs[]?int?nrhs?const?mxArray?*prhs[])
{
????//Declarations
???double?*FArray*SArray*outArray*M;
/*?FArray???-?Filter?coefficients
???SArray???-?Signal?coefficients
???outArray?-?Output?coefficients
???M????????-?upsampling?matrix? */
???int?SColLengthSRowLengthFColLengthFRowLengthO_SColLengthO_SRowLength;
???int?SFColLengthSFRowLength;
???int?n1n2l1l2k1k2f1f2?kk2?kk1;
???double?sum;???
???int?M0M3sM0sM3;
????//Get?the?input?sizes
????SColLength?=?mxGetM(SIGNAL);?
????SRowLength?=?mxGetN(SIGNAL);
????FColLength?=?mxGetM(FILTER);?
????FRowLength?=?mxGetN(FILTER);
????
????SFColLength?=?FColLength-1;
????SFRowLength?=?FRowLength-1;
????
//Get?The?Data
????FArray?=?mxGetPr(FILTER);
????SArray?=?mxGetPr(SIGNAL);
????M?=?mxGetPr(MMATRIX);
????M0?=?(int)M[0];????
????M3?=?(int)M[3];???
????sM0?=?M0-1;
????sM3?=?M3-1;
????
//?Corrected?Lengths
O_SColLength?=?SColLength?-?M0*FColLength?+?1;
O_SRowLength?=?SRowLength?-?M3*FRowLength?+?1;
????//Make?output?size?and?Allocate?out?vector
????
?
????OUT??????=?mxCreateDoubleMatrix(O_SColLength?O_SRowLength?mxREAL);?
????outArray?=?mxGetPr(OUT); //outArray?is?new?vector
?
/*?Convoluyion?loop?*/
????for?(n1=0;n1 for?(n2=0;n2 sum=0; ????
????kk1?=?n1?+?sM0;;
for?(k1=0;k1 ?? ????kk2?=?n2?+?sM3;
for?(k2=0;k2 ?f1?=?SFRowLength?-?k1;?/*?flipped?index?*/
?f2?=?SFColLength?-?k2;??
?sum+=?FArray[LINPOS(f1f2FColLength)]?*?SArray[LINPOS(kk1kk2SColLength)];
?kk2+=M3;
}
kk1+=M0;
}?
????outArray[LINPOS(n1n2O_SColLength)]?=?sum;
}
}
????return;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2928??2015-06-18?08:43??NSCT\atrousc.c
?????文件???????8664??2015-06-18?08:43??NSCT\atrousc.mexmac
?????文件???????7168??2015-10-23?09:43??NSCT\atrousc.mexw32
?????文件???????1192??2015-06-18?08:43??NSCT\atrousdec.m
?????文件??????19170??2015-06-18?08:43??NSCT\atrousfilters.m
?????文件????????973??2015-06-18?08:43??NSCT\atrousrec.m
?????文件???????3214??2015-06-18?08:43??NSCT\decdemo.m
?????文件????????671??2015-11-12?09:13??NSCT\DEMO.m
?????文件???????1612??2015-09-21?15:48??NSCT\dfbdecdemo.m
?????文件??????12802??2015-06-18?08:43??NSCT\dfilters.m
?????文件???????2531??2015-06-18?08:43??NSCT\dmaxflat.m
?????文件???????1065??2015-06-18?08:43??NSCT\efilter2.m
?????文件????????209??2008-10-29?13:58??NSCT\expEdge.m
?????文件???????1792??2015-06-18?08:43??NSCT\extend2.m
?????文件???????2508??2015-10-15?20:14??NSCT\filtergrid.m
?????文件????????506??2008-07-02?09:52??NSCT\findalph.m
?????文件???????2740??2015-10-19?16:40??NSCT\fusionIH.m
?????文件?????553838??2016-01-05?11:27??NSCT\fusionNSCT.bmp
?????文件?????141728??2016-01-05?11:29??NSCT\fusionNSCT.bmp.enp
?????文件???????1128??2015-10-27?08:59??NSCT\Hist?Match.m
?????文件????????178??2015-10-27?10:15??NSCT\HISTdemo.m
?????文件???????5779??2015-10-27?09:39??NSCT\histmatch.m
?????文件????????516??2015-10-19?11:11??NSCT\IHS.m
?????文件????????159??2015-12-12?11:42??NSCT\IHSDEMO.m
?????文件????????762??2015-10-27?09:57??NSCT\imhist_my.m
?????文件???????2149??2015-10-19?11:30??NSCT\invIHS.m
?????文件????????819??2015-06-18?08:43??NSCT\ld2quin.m
?????文件????????638??2015-06-18?08:43??NSCT\ldfilter.m
?????文件???????2520??2015-10-15?20:15??NSCT\lowpassfilter.m
?????文件????????854??2015-06-18?08:43??NSCT\mctrans.m
............此處省略37個文件信息
評論
共有 條評論