Definition at line 27 of file mainTiming.cpp. References Impala::Core::Array::ConvKernelSeparated(), Impala::Util::Database::GetInstance(), Impala::Core::Array::MakeGaussian1d(), Impala::Core::Array::ReadRaw(), and Impala::Core::Array::RGB2Intensity(). Referenced by DoConvSep(). 00028 { 00029 Array2dVec3UInt8* srcData = 0; 00030 ReadRaw(srcData, srcName, &Util::Database::GetInstance()); 00031 int borderSize = 39; 00032 Array2dScalarReal64* rData; 00033 rData = ArrayClone<Array2dScalarReal64>(srcData, borderSize, borderSize); 00034 RGB2Intensity(rData, srcData); 00035 delete srcData; 00036 00037 int f, g, i; 00038 //const int numFunc = 8; 00039 const int numFunc = 3; // not all implemented yet 00040 const int numGauss = 10; 00041 Array2dScalarReal64* gauss[numGauss]; 00042 gauss[0] = MakeGaussian1d(1.0, 0, 2.0, 3); // size == 3 00043 gauss[1] = MakeGaussian1d(1.0, 0, 3.0, 100); // size == 7 00044 gauss[2] = MakeGaussian1d(1.0, 0, 5.0, 100); // size == 11 00045 gauss[3] = MakeGaussian1d(1.7, 0, 4.0, 100); // size == 15 00046 gauss[4] = MakeGaussian1d(2.3, 1, 4.0, 100); // size == 19 00047 gauss[5] = MakeGaussian1d(2.7, 1, 4.0, 100); // size == 23 00048 gauss[6] = MakeGaussian1d(3.2, 1, 4.0, 100); // size == 27 00049 gauss[7] = MakeGaussian1d(3.7, 1, 4.0, 100); // size == 31 00050 gauss[8] = MakeGaussian1d(4.2, 1, 4.0, 100); // size == 35 00051 gauss[9] = MakeGaussian1d(4.7, 1, 4.0, 100); // size == 39 00052 int gaussSize[numGauss]; 00053 for (i=0 ; i<numGauss ; i++) 00054 gaussSize[i] = gauss[i]->CW(); 00055 int nrSplitTimes = 5; 00056 TimePlot plotter(numFunc, numGauss, gaussSize, nrSplitTimes, runCount); 00057 00058 Array2dScalarReal64* res = ArrayClone<Array2dScalarReal64>(rData); 00059 00060 /* 00061 std::vector<Array2dScalarReal64*> resList; 00062 for (g=0 ; g<numGauss ; g++ ) { 00063 Array2dScalarReal64* r = 0; 00064 r = ConvKernelSeparated(r, rData, gauss[g], gauss[g]); 00065 resList.push_back(r); 00066 } 00067 String fName = srcName + "_g"; 00068 // MSVC requires explicit use of template type (internal compiler error) 00069 WriteRawList<Array2dScalarReal64>(resList, fName, true); 00070 return; 00071 */ 00072 00073 for (i=0 ; i<runCount ; i++) 00074 { 00075 for (g=0 ; g<numGauss ; g++) 00076 { 00077 for (f=0 ; f<numFunc ; f++) 00078 { 00079 plotter.Start(f, g, i); 00080 ConvKernelSeparated(res, rData, gauss[g], gauss[g], f, &plotter); 00081 plotter.Stop(); 00082 } 00083 } 00084 } 00085 00086 String* funcName = new String[numFunc]; 00087 funcName[0] = "0nai"; 00088 funcName[1] = "1sim"; 00089 funcName[2] = "2siminc"; 00090 /* 00091 funcName[3] = "3hor"; 00092 funcName[4] = "4horinc"; 00093 funcName[5] = "5ver"; 00094 funcName[6] = "6vercyc"; 00095 funcName[7] = "7min"; 00096 */ 00097 00098 String baseName = srcName.substr(0, srcName.find('.')); 00099 plotter.SaveData(machineName, String("convsep"), baseName, funcName); 00100 00101 delete [] funcName; 00102 delete rData; 00103 delete res; 00104 }
Here is the call graph for this function:
|