谁有小波变换的源码?

rustland 2002-09-03 11:50:39
不管什么样的小波变换都行,观摩之用,急,谢谢。
...全文
52 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
nudtpaladin 2002-09-18
  • 打赏
  • 举报
回复
我有小波变换的程序 包括小波的mallat分解 提升小波分解 整数小波分解
二进制小波分解等算法,都是自个编的。不过要那东西交换: 我感兴趣的是:
图像处理(超分辨分析 分割 边缘 去噪声) 图像压缩 视频压缩 小波理论 滤波器设计 快速算法等 我的邮箱: zenghui1980@163.com
duwenyong 2002-09-10
  • 打赏
  • 举报
回复
WaveletGray(pTemp,Width,Height,Width,Height,depth);
哈尔小波变换
void CChildView::WaveletGray(PBYTE pImgData, DWORD dx, DWORD dy,DWORD SrcWidth,DWORD SrcHeight,int depth)
{
double factor=0.707107;//1.0/sqrt(2.0)
BYTE *tempx,*tempy;
DWORD offset;
DWORD x,y;

if(depth<0) return;
factor=0.5;
tempx=(BYTE *)malloc(SrcWidth*SrcHeight*sizeof(BYTE));
tempy=(BYTE *)malloc(SrcWidth*SrcHeight*sizeof(BYTE));

for(y=0;y<dy;y++)//行变换
{
offset=y*SrcWidth;
for(x=0;x<dx/2;x++)
{
tempx[x+offset]=(pImgData[x*2+offset]+pImgData[(x*2+1)+offset])*factor;//LOW-PASS
// tempx[(x+dx/2)+offset]=(pImgData[x*2+offset]-pImgData[(x*2+1)+offset])*factor; //HIGH-PASS
tempx[(x+dx/2)+offset]=pImgData[x*2+offset]-tempx[x+offset]; //HIGH-PASS
}
}
for(x=0;x<dx;x++)//列变换
for(y=0;y<dy/2;y++)
{
tempy[x +y*SrcWidth]= (tempx[x +y*2*SrcWidth] + tempx[x +(y*2+1)*SrcWidth]) *factor; //LOW-PASS
tempy[x +(y+dy/2)*SrcWidth]= (tempx[x+y*2*SrcWidth] - tempx[x +(y*2+1)*SrcWidth]) *factor; //HIGH-PASS
}
for(y=0;y<dy;y++)//Copy to Wavelet
memcpy(&pImgData[y*SrcWidth],&tempy[y*SrcWidth],dx*sizeof(BYTE));

free(tempx);
free(tempy);
if(depth>0)
WaveletGray(pImgData,dx/2,dy/2,SrcWidth,SrcHeight,depth-1); //Repeat for SubDivisionDepth
}
rustland 2002-09-03
  • 打赏
  • 举报
回复
不管什么样的小波变换都行,观摩之用,急,谢谢。
我的信箱juvola@hotmail.com

4,447

社区成员

发帖
与我相关
我的任务
社区描述
图形图像/机器视觉
社区管理员
  • 机器视觉
  • 迪菲赫尔曼
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧