资源简介
经典图像融合算法, 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个文件信息
相关资源
- 用matlab调用c程序
- 时空上下文视觉跟踪STC含有matlab和c
- 语音识别MFCC特征提取matlab代码
- 基于MATLAB的温度场模拟
- 基础版小波变换的Mallat算法含C和mat
- MFCC参数提取的matlab实现
- DWA算法验证
- Itti视觉注意模型Matlab
- BP算法程序实现包括matlab、C语言、C
- c++ 实现matlab smooth 函数
- C++实现MATLAB的filter函数
- C语言实现matlab的butter函数
- 声纹识别MATLAB源程序全代码
- 语种识别MATLAB程序
- PID算法Matlab仿真程序和C程序
- MFCC的matlab实现
- aes加密算法matlab
- MFC和MATLAB混合编程
- matlab2016b配置VS2017编译器mexopts补丁文
- L1范数最小化算法matlab代码(修改过可
- 相机标定棋盘
- ICP算法源代码拿走不谢
- 基于Matlab的声纹锁
- 各种语言编写的pcm代码
- LMSE(Ho-Kashyap).rar
- PCA和KPCA的Matlab和C++程序
- matlab实现VQ说话人识别系统
- DWA算法验证(matlab)
- matlab2016b vs2017编译器补丁文件
- PEMFC matlab 仿真
评论
共有 条评论