当前位置:文档之家› 二维小波分解与重构程序实例

二维小波分解与重构程序实例

0.292562,0.564406,0.292562,-0.0485391,-0.0482602,-0.0196637,
0.00569794,-0.0033276};
float g[DD]={0.00332761,0.00569794,-0.0196637,-0.0482603,0.0485391,
public:
TSubWindow(TWindow* parent);
~TSubWindow();
protected:
void EvSize(UINT sizeType, TSize& size)
{Invalidate(); TFrameWindow::EvSize(sizeType, size);}
二维小波分解与重构程序实例
// *********(基于Windows的二维小波分解与重构BC++4。5)**********//
#include <owl/owlpch.h>
#include <owl/applicat.h>
#include <owl/dc.h>
#include <owl/menu.h>
//*****Inverse Wavelet Transform*********************//
void iwt(int xs,int ys,long xsize,long ysize);
float *img[SIZE],*imgx[SIZE],*imgy[SIZE];
//****for evolution agents*****//
Attr.Y = 100;
Attr.W = 300;
Attr.H = 400;
}
//
// Destroy window. SubWinPtr[Type] is set to 0 to indicate that the window
// has be closed.
//
TSubWindow::~TSubWindow()
// facilitate receiving of clipboard change notifications. Could mix it in if
// an additional base was desired.
//
class TSubWindow : public TFrameWindow {
int AgentNum,ActiveAgent;
int SolutionX[1000],SolutionY[1000];
int SearchNum,AgentLife;
int Agent[1000][2];
int isAgentAlive[1000];
int SearchTime;
unsigned short Image[32][32];
TDib* Dib;
TBitmap* Bitmap;
TMemoryDC * pMemDC;
TPalette* Palette;
//
TWindow* SubWinPtr = 0;
TSubWindow::TSubWindow(TWindow* parent)
: TFrameWindow(parent)
{
Attr.Style |= WS_VISIBLE | WS_POPUP | WS_OVERLAPPEDWINDOW,
Attr.X = 100;
int s(float x);
//Set Inverse Filter Coefficients//
void coef();
//********Wavelet Transform************************//
void wt(int xs,int ys,long xsize,long ysize);
void Paint(TDC& dc, bool, TRect&);
DECLARE_RESPONSE_TABLE(TSubWindow);
};
DEFINE_RESPONSE_TABLE1(TSubWindow, TFrameWindow)
EV_WM_SIZE,
END_RESPONSE_TABLE;
// pointers to different child windows.
#define MAXAPPNAME 20
static const char AppName[] = "Image Processing";
//
// TBmpViewWindow, a Bitmap displaying window derived from TClipboardViewer to
0.292562,-0.564406,0.292562,0.0485391,-0.0482602,0.0196637,
0.00569794,0.0033276};
float hi[DD],gi[DD];
int wavelet_direction=1;
int a(int x,int xsize);
//Threshold//
{
SubWinPtr = 0;
}
void
TSubWindow::Paint(TDC& dc, bool, TRect&)
{
}
class TBmpViewWindow : virtual public TWindow, public TClipboardViewer {
public:
char FileName[MAXPATH];
#include <owl源自framewin.h>#include <owl/scroller.h>
#include <owl/opensave.h>
#include <owl/clipview.h>
#include <string.h>
#include <alloc.h>
#include <dir.h>
#include <math.h>
#include "stdio.h"
#include "stdlib.h"
#include "bmpview.h"
#define PI 3.1415926
#define SIZE 256
#define DD 13
float h[DD]={-0.00332761,0.00569794,0.0196637,-0.0482603,-0.0485391,
相关主题