#include <iostream>
using namespace std; #include "mallok.h" #include "Haar.h" #include "_5_3.h" #include "dwt1d.h" //#define TYPE long //#include "dwt2d.h" #include "rgb_image.h" #define Y 100 #define X 200 #define N 1000 #define L 3 #define TRAN _5_3 #define TYPE rgb_image int main() { dwt1d < TYPE, TRAN < TYPE > > x; cout << x.TRAN < TYPE >::get_filter_name() << ’\n’; x.set_max_line_size(N); class mallok *m = new class mallok(); TYPE *d = (TYPE *)m->alloc_1d(N, sizeof(TYPE)); for(int n=0; n<N; n++) { d[n].create(Y,X); for(int y=0; y<Y; y++) { for(int x=0; x<X; x++) { d[n][0][y][x] = y; d[n][1][y][x] = y; d[n][2][y][x] = y; } } } x.analyze(d, N, L); x.synthesize(d, N, L); } |