资源简介
用contourlet变换的nsct改进算法的图像处理,代码中哟实例,可以加以参考
代码片段和文件信息
/******************************************************************
* 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
文件 3214 2005-01-21 15:59 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
文件 1001 2005-01-20 23:27 nsct_toolbox\shownsct.m
文件 888 2005-12-19 11:07 nsct_toolbox\symext.m
文件 161 2004-10-16 15:44 nsct_toolbox\upsample2df.m
............此处省略9个文件信息
相关资源
- matlab程序-信息安全密码学BM算法
- USM_Sharpen基于matlab的锐化程序
- 元胞自动机实现高速公路收费站matl
- MATLAB模型文件-永磁同步电机变频调速
- IEEE802.11b 物理层DBPSK编码程序
- MIMO_OFDM联合仿真的matlab 源程序很完整
- 基于Matlab的导弹飞行动力学仿真模型
- DFT Matlab代码
- matlab求最小矩形
- matlab的FIR滤波器设计
- 5/3小波的分解与重构Matlab
- LDPC编码matlab
- 船舶一阶野本Nomoto模型
- matlab使用TCP/IP Server Sockets
- 反步法的Matlab程序
- 简单易理解的霍夫曼编码matlab程序
- 快速可靠的噪声估计程序(matlab程序
- Matlab分水岭法分割图像代码
- Matlab 简单迭代法
- 基于Matlab的FIR数字滤波器的设计与仿
- 柴油机matlab仿真
- 白化滤波器Matlab
- QC_LDPC 校验矩阵构造函数matlab
- 离散相似法仿真控制系统
- matlab四节点矩形刚度矩阵代码
- Matlab实现有限差分法解二维热传导问
- matlab制作的自动控制原理的GUI界面
- 用摄像头在MATLAB上录制avi格式视频
- 使用matlab的验证码识别
- OFDM瑞利衰落信道下的MATLAB程序
评论
共有 条评论