C语言写的中值平滑滤波,以后做算法实现要用到
2011年04月18日
C语言写的中值平滑滤波,以后做算法实现要用到.代码如下:
//***********//中值平滑//**********void MedSmooth(float *in,int dataLen,int smoothLen,float *out){float *tmp=new float[smoothLen];int i=0,j=0;if(!in)return;if(smoothLen ( dataLen - ( smoothLen - 1 ) / 2) ) )out=in;else{for(j=0;jt) //在右边的只要比基准点大仍放在右边
{
j--; //前移一个位置
}
if (i中值平滑滤波
2011年04月18日
C语言写的中值平滑滤波,以后做算法实现要用到.代码如下:
//***********//中值平滑//**********void MedSmooth(float *in,int dataLen,int smoothLen,float *out){float *tmp=new float[smoothLen];int i=0,j=0;if(!in)return;if(smoothLen ( dataLen - ( smoothLen - 1 ) / 2) ) )out=in;else{for(j=0;jt) //在右边的只要比基准点大仍放在右边
{
j--; //前移一个位置
}
if (i中值平滑滤波