Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

Array2dScalarReal64* Impala::Core::Array::MakeGabor ( int  size,
double  sigma,
double  frequency,
double  orientation,
bool  symmetric 
)

Definition at line 14 of file MakeGabor.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB().

Referenced by Impala::Core::Tracking::GaborFilterSet::GaborFilterSet().

00015 {
00016     Array2dScalarReal64* filter = new Array2dScalarReal64(size, size, 0, 0);
00017 
00018     double cr = cos(orientation);
00019     double sr = sin(orientation);
00020     int begin = size/2;
00021     int end = size - begin;
00022     for(int y=-begin ; y<end ; y++)
00023     {
00024         double* p = filter->CPB(0, y+begin);
00025         for(int x=-begin ; x<end ; x++)
00026         {
00027             if(symmetric)
00028                 *p = cos((x*cr + y*sr) / frequency) * exp(-(x*x + y*y) / (2*sigma*sigma));
00029             else
00030                 *p = sin((x*cr + y*sr) / frequency) * exp(-(x*x + y*y) / (2*sigma*sigma));
00031             p++;
00032         }
00033     }
00034 
00035     return filter;
00036 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:57:38 2010 for ImpalaSrc by  doxygen 1.5.1