资源简介
nl-means算法及fast nl-means matlab

代码片段和文件信息
#include “mex.h“
#include “math.h“
#include “string.h“
/* undef needed for LCC compiler */
#undef EXTERN_C
/* Multi-threading libraries */
#ifdef _WIN32
#include
#include
#else
#include
#endif
__inline double pow2(double a) { return a*a; }
double * gaussian_kernel_2D(int kernelratio){
/* Create the Gaussian 2D kernel */
int kernelsize npixels x y i j p;
double sumK sigma *K;
kernelsize=kernelratio*2+1;
sigma=((double)kernelsize)/4.0; p=0;
npixels=kernelsize*kernelsize;
K=(double*)malloc(npixels*sizeof(double));
for (i=0; i for (j=0; j x=i-kernelratio; y=j-kernelratio;
K[p] = exp(-((pow2(x)+pow2(y))/(2.0*pow2(sigma))));
p++;
}
}
/* Normalize kernel */
sumK=0; for(i=0; i for(i=0; i return K;
}
double * gaussian_kernel_3D(int kernelratio) {
/* Create the Gaussian 3D kernel */
int kernelsize npixels x y z i j k p;
double sumK sigma *K;
kernelsize=kernelratio*2+1; sigma=((double)kernelsize)/4.0; p=0;
npixels=kernelsize*kernelsize*kernelsize;
K=(double*)malloc(npixels*sizeof(double));
for (i=0; i for (j=0; j for (k=0; k x=i-kernelratio; y=j-kernelratio; z=k-kernelratio;
K[p] = exp(-((pow2(x)+pow2(y)+pow2(z))/(2.0*pow2(sigma)))); p++;
}
}
}
/* Normalize kernel */
sumK=0; for(i=0; i for(i=0; i return K;
}
void get2Dvectors(double *I int *Isize double *V int *Vsize int kernelratio int *block double *K int ThreadID int Nthreads) {
int indexI indexI_part1 indexI_part2 indexI_part3;
int indexV=0;
int kernelsize;
int npixels2;
int C1;
int x y p;
int tz ik jk;
int block_size[2];
block_size[0]=block[2]-block[0]+1;
block_size[1]=block[3]-block[1]+1;
kernelsize=2*kernelratio+1;
C1=-(block[0]+block[1]*block_size[0])*Vsize[0];
npixels2=Isize[0]*Isize[1];
/* Loop through the block */
for(y=block[1]; y<=block[3]; y++) {
for(x=block[0]+ThreadID; x<=block[2]; x+=Nthreads) {
indexV=(x+y*block_size[0])*Vsize[0]+C1;
/* Get a patch*/
indexI_part1=0;
for(tz=0; tz p=0;
indexI_part3=(y-kernelratio)*Isize[0];
indexI_part2=x-kernelratio+indexI_part1;
indexI=indexI_part2+ indexI_part3;
for (jk=0; jk for (ik=0; ik V[indexV]=K[p]*I[indexI];
indexV++; indexI++;
p++;
}
indexI_p
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8859 2010-09-07 15:50 NLMF.m
文件 3510 2010-09-07 17:17 NLMF2Dtree.m
文件 12141 2010-04-28 18:48 image2vectors_double.c
文件 12162 2010-04-28 18:48 image2vectors_single.c
文件 10757 2005-09-26 17:08 lena.jpg
文件 1335 2010-09-07 12:05 license.txt
文件 15772 2010-04-28 18:48 vectors_nlmeans_double.c
文件 15724 2010-04-28 18:48 vectors_nlmeans_single.c
- 上一篇:GPS信号产生
- 下一篇:激光锁模技术matlab程序代码
相关资源
- 相关向量机的快速算法
- Faster-RCNN+ZF制作自己的数据集和训练模
- FASTICA盲源信号分离代码Matlab
- fastFWI-master.zip
- Clustering by fast search and find of density
- Faster-RCNN+ZF制作自己的数据集和训练模
- Clustering by fast search and find of density
- fast角点检测算法for matlab
- 快速引导滤波
- FAST特征点检测算法的matalb源码实现
- FAST角点检测算法MATLAB程序
- 基于FASTica算法的独立成分分解
- FCT(Fast Compress Tracking)目标跟踪程序
- FasterRCNN mex等文件
- Fast Subspace Clustering via RepresentationSp
- RCNNfast-RCNN和faster-RCNN最全文献和matl
- fastKICA matlab程序
- FastIca独立成分分析代码
- Fast_Kurtogram.m
- FastICA2.5
- FAST检测角点+SIFT特征描述符描述角点
- FasterRcnn2.m
- FASTICA盲源信号分离代码Matlab(复信号
- FastSLAMmatlab仿真算法
- 超详细的ORB解读.md
- fastslam matlab 仿真算法
- fast源代码
- Fast Marching.rar
- FAST v8 S_function
- matlab FastICA工具箱
评论
共有 条评论