Definition at line 24 of file ColorGaussResponses.h. References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), ColorSpace(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Norm2(), Impala::Core::Array::Element::OOO, ProjectRange(), RecGauss(), Impala::Core::Array::Element::RGB, and Set(). Referenced by ColorSegmentation(). 00025 { 00026 const int nrScales = 4; 00027 double scales[nrScales]; 00028 00029 scales[0] = 1.0 ; 00030 scales[1] = 2.0 ; 00031 scales[2] = 3.5 ; 00032 scales[3] = 7.0 ; 00033 00034 // convert to opponent color space 00035 ColorSpace(im, im, Element::RGB, Element::OOO); 00036 00037 int width = im->CW(); 00038 int height = im->CH(); 00039 00040 // declare and initialize temporary images 00041 std::vector<Array2dScalarReal64*> imList; 00042 int borderSize = 14; // make sure this is large enough! 00043 ArrayPool imOOO(width, height, 0, 0); 00044 imOOO.AllocSR64(3, borderSize, borderSize); 00045 imOOO.AllocC64(3, borderSize, borderSize); 00046 for (int ii=0 ; ii<3 ; ii++) 00047 { 00048 Array2dScalarReal64* tmpSR64 = imOOO.GetSR64(ii); 00049 ProjectRange(tmpSR64, im, ii+1); 00050 Array2dComplex64* tmpC64 = imOOO.GetC64(ii); 00051 Set(tmpC64, tmpSR64); 00052 } 00053 00054 for (int si=0; si<nrScales-1; si++) 00055 { 00056 for (int derx=0 ; derx<=1 ; derx++) 00057 { 00058 for (int dery=0 ; dery<=derx ; dery++) 00059 { 00060 for (int pixDim=1 ; pixDim<=3 ; pixDim++) 00061 { 00062 Array2dScalarReal64* res = 0; 00063 RecGauss(res, imOOO.GetSR64(pixDim-1), scales[si], 00064 scales[si], derx, dery, 3); 00065 Norm2(res, res); 00066 RecGauss(res, res, 1.95*scales[si], 1.95*scales[si], 00067 0, 0, 3); 00068 imList.push_back(res); 00069 std::cout << "imList.size = " << imList.size() << std::endl; 00070 } 00071 } 00072 } 00073 } 00074 00075 return imList; 00076 }
Here is the call graph for this function:
|