/* Copyright (c) 2001 C. Grigorescu */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <tip.h> // Example program for the "fwt" and "ifwt" functions. // // Usage: // test_wavelet2 <input_image> // int main(int argc, char *argv[]) { // Test for the correct number of arguments in the command line. if (argc != 2) { cout << "Usage: " << argv[0] << " <input_image>" << endl; exit(0); } char l; // Read an floating point valued image and display it. FloatImage im0; im0.readImage(argv[1]); im0.showImage(); cin >> l; // Perform a 3-level decomposition (direct FWT) on the "im0" image with // a BIOR_1_3 set of wavelets. fwt(im0, 3, BIOR_1_3); // Display the result of the FWT. im0.showImage(); cin >> l; // Perform a 3-level reconstruction (inverse FWT) on the "im0" image // using the BIOR_1_3 set of wavelets. ifwt(im0, 3, BIOR_1_3); im0.showImage(); cin >> l; im0.closeWindow(); return(1); }