00001
00002
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 #include <string.h>
00006 #include <tip.h>
00007
00008 int main(int argc, char *argv[])
00009 {
00010
00011 if (argc != 2) {
00012 cout << "Usage: " << argv[0] << " <input_image>" << endl;
00013 exit(0);
00014 }
00015
00016 FloatImage im0;
00017 im0.readImage(argv[1]);
00018
00019
00020 Timer t;
00021 FourierTransform a(im0);
00022
00023
00024 t.Start();
00025
00026
00027 float f1 = t.getTime();
00028 float f2;
00029 for (int i=0;i<10;i++) {
00030 a.fft();
00031 a.ifft();
00032 f2 = t.getTime();
00033
00034 cout << "Time: " << f2 - f1 << endl;
00035 }
00036
00037 t.Stop();
00038
00039
00040 t.Print();
00041 }