资源简介
最近比较火的研究热点非下采样轮廓波变换代码,可以提取轮廓,而且对光照撸棒性较好,还可用于光照不变量提取,有关于代码不懂的,可以私信我
代码片段和文件信息
/******************************************************************
* 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;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2969 2004-10-17 16:42 NSCT_toolbox\atrousc.c
文件 7168 2004-10-17 16:45 NSCT_toolbox\atrousc.dll
文件 8664 2005-01-24 21:51 NSCT_toolbox\atrousc.mexmac
文件 1234 2005-11-03 09:10 NSCT_toolbox\atrousdec.m
文件 19406 2004-09-09 15:01 NSCT_toolbox\atrousfilters.m
文件 1012 2004-10-17 16:45 NSCT_toolbox\atrousrec.m
文件 3245 2013-05-03 20:27 NSCT_toolbox\decdemo.m
文件 1495 2004-12-22 22:48 NSCT_toolbox\dfbdecdemo.m
文件 13234 2004-10-18 12:28 NSCT_toolbox\dfilters.m
文件 2607 2004-12-22 21:26 NSCT_toolbox\dmaxflat.m
文件 1103 2003-04-10 11:30 NSCT_toolbox\efilter2.m
文件 1861 2003-11-06 00:25 NSCT_toolbox\extend2.m
文件 856 2003-04-10 11:30 NSCT_toolbox\ld2quin.m
文件 662 2003-11-05 10:17 NSCT_toolbox\ldfilter.m
文件 854 2003-11-05 10:19 NSCT_toolbox\mctrans.m
文件 775 2003-04-10 11:30 NSCT_toolbox\modulate2.m
文件 4662 2005-11-03 10:47 NSCT_toolbox\nsctdec.m
文件 3257 2005-11-03 10:33 NSCT_toolbox\nsctrec.m
文件 5046 2005-01-20 23:13 NSCT_toolbox\nsdfbdec.m
文件 4931 2005-01-20 23:14 NSCT_toolbox\nsdfbrec.m
文件 889 2005-12-19 11:12 NSCT_toolbox\nsfbdec.m
文件 821 2004-10-21 07:11 NSCT_toolbox\nsfbrec.m
文件 2424 2005-01-20 23:51 NSCT_toolbox\nssfbdec.m
文件 2785 2005-01-20 23:50 NSCT_toolbox\nssfbrec.m
文件 1552 2004-08-07 18:43 NSCT_toolbox\parafilters.m
文件 1161 2003-11-07 19:58 NSCT_toolbox\qupz.m
文件 1557 2005-01-20 23:45 NSCT_toolbox\README.txt
文件 1981 2003-04-10 11:30 NSCT_toolbox\resampz.m
文件 11078 2013-01-24 15:03 NSCT_toolbox\s7_2.bmp
文件 1001 2005-01-20 23:27 NSCT_toolbox\shownsct.m
............此处省略15个文件信息
- 上一篇:异步电机simuli
nk数学模型 - 下一篇:HEED协议的matlab源代码
相关资源
- HEED协议的matlab源代码
- 冈萨雷斯数字图像处理matlab版.源代码
- matlab仿真 短时谱 语谱图 倒谱复倒谱
- 计算色温matlab版
- 多进制空时分组码(STBC)matlab仿真
- pca与KL变换的综合matlab实现代码
- matlab计算粗糙集的下近似属性依赖度
- 用matlab编写的一些相关InSAR数据处理程
- CRC校验的Matlab源代码
- 基于MATLAB直流调速系统设计与仿真
- matlab在时间序列建模预测及程序代码
- 最优化matlab作业代码
- BFGS+DFP+SUMT——matlab源程序一例
- 曲柄滑块机构的运动学matlab仿真 源代
- 共轭梯度优化方法MATLAB代码
- 图像归一化
- matlab计算图像锐度
- matlab边缘细化源代码
- matlab 数字信号处理函数
- my_alphanoise.rar
- DFT的matlab实现的 源程序
- matlab注水原理
- matlab计算心率 QRS波群定位
- 运动目标航迹仿真
- 语音信号倒谱的matlab程序
- 连续相对定向 matlab
- 数据加密标准DESmatlab程序
- matlab编写的去除粗大误差的程序
- ISOMAP 源码matlab编写
- 无迹kalman滤波
评论
共有 条评论