Example #1
0
/*!
    \fn CvGabor::Init(double dPhi, int iNu, double dSigma, double dF)
Initilize the.gabor

Parameters:
        dPhi    The orientations
        iNu     The scale can be from -5 to infinit
        dSigma  The Sigma value of gabor, Normally set to 2*PI
        dF      The spatial frequence , normally is sqrt(2)

Returns:
        None

Initilize the.gabor with the orientation dPhi, the scale iNu, the sigma dSigma, the frequency dF, it will call the function creat_kernel(); So a gabor is created.filename      The name of the image file
        file_format     The format of the file, e.g. GAN_PNG_FORMAT
        image   The image structure to be written to the file
        octrlstr        Format-dependent control structure

 */
void CvGabor::Init(double dPhi, int iNu, double dSigma, double dF)
{

    bInitialised = false;
    bKernel = false;
    Sigma = dSigma;
    F = dF;
   
    Kmax = PI/2;
   
    // Absolute value of K
    K = Kmax / pow(F, (double)iNu);
    Phi = dPhi;
    bInitialised = true;
    Width = mask_width();
    Real = cvCreateMat( Width, Width, CV_32FC1);
    Imag = cvCreateMat( Width, Width, CV_32FC1);
    creat_kernel();  
}
Example #2
0
/**
 * @brief Initilize the.gabor with the orientation iMu, the scale iNu, 
 * the sigma dSigma, the frequency dF, it will call the function 
 * creat_kernel(); So a gabor is created.
 * @param iMu   The orientations which is iMu*PI.8
 * @param iNu   The scale can be from -5 to infinit
 * @param dSigma  The Sigma value of gabor, Normally set to 2*PI
 * @param dF  The spatial frequence , normally is sqrt(2)
 */
void CvGabor::Init(int iMu, int iNu, double dSigma, double dF)
{
// printf("CvGabor::Init: start\n");
  //Initilise the parameters 
  bInitialised = false;
  bKernel = false;

  Sigma = dSigma;
  F = dF;

  Kmax = PI/2;

  // Absolute value of K
  K = Kmax / pow(F, (double)iNu);
  Phi = PI*iMu/8;
  bInitialised = true;
  Width = mask_width();
  Real = cvCreateMat( Width, Width, CV_32FC1);
  Imag = cvCreateMat( Width, Width, CV_32FC1);
  creat_kernel();  
// printf("CvGabor::Init: done\n");
}