00001
00002
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 #include <tip.h>
00006
00007
00008
00009
00010
00011
00012
00013 int main(int argc, char *argv[])
00014 {
00015
00016 if (argc != 4) {
00017 cout << "Usage: " << argv[0] << " <sigma> <aspect> <orientation> " << endl;
00018 exit(0);
00019 }
00020
00021
00022 FloatKernel k1(32,32, "gabor.pgm");
00023 float sigma = atof(argv[1]);
00024 float aspect = atof(argv[2]);
00025 float orientation = atof(argv[3]);
00026
00027
00028 k1.makeGabor(sigma, aspect, 0.0, 10.0, 0.0);
00029
00030 k1.writeKernel();
00031
00032 k1.showKernel();
00033
00034
00035 FloatKernel k2(128, 128, "Test Gauss");
00036 k2.makeGauss(sigma,aspect,orientation);
00037 k2.showKernel();
00038
00039
00040
00041 FloatKernel tri(32,32,"Triang. pulse");
00042 tri.makeRectangularPulse(sigma,12);
00043 tri.makeTriangularPulse(sigma,12);
00044
00045
00046
00047 tri.writeKernelCoeffs("test.coeff", "Triangular pulse: supp. = 12");
00048 tri.showKernel();
00049
00050
00051 FloatKernel re("Read");
00052 re.readKernelCoeffs("test.coeff");
00053 re.showKernel();
00054
00055 char l;
00056 cin >> l;
00057 return(1);
00058 }