LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::gaborKernel< T > Class Template Reference

two-dimensional gabor filter kernel More...

#include <ltiGaborKernels.h>

Inheritance diagram for lti::gaborKernel< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::gaborKernel< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 gaborKernel (const int &size, const double &theVariance, const double &frequency, const double &angle)
void generate (const int &size, const double &theVariance, const double &frequency, const double &angle)

Detailed Description

template<class T>
class lti::gaborKernel< T >

two-dimensional gabor filter kernel

The Gabor kernels are defined by the following equation:

$ f_{mn}(x,y) = \frac{1}{2\pi\sigma^2}\exp(-\frac{x^2+y^2}{2\sigma_m^2}) \cos\left(\omega_mx\cos\theta_n+\omega_my\sin\theta_n \right) $

The index m denotes the "band" of the filter (which variance it uses) and the index n the direction of the filter.

For this implementation, the volume under the gauss function for the specified size will be normalized to 1. The result will be modulated with the given direction and frequency.

Due to the nature of this filter, avoid its use with unsigned byte channels! (no lti::channel8, only lti::channel).

You can use an approximation of this kern as separable filter (see lti::sepKernel<T>::separate()), or you can use the lti::gaborKernelSep as a two-filter-pair separable filter.

Example:

      // the channel to be filtered:
      lti::channel data;

      // ... initialize channel here ...

      // gabor filter kernel with 7 elements, a variance of 1.0, frequency
      // of 0.5 and 45°
      lti::gaborKernel<channel::value_type> kernel(7,1.0,0.5,45.0*Pi/180.0);

      lti::convolution filter;                        // convolution operator
      lti::convolution::parameters param;             // parameters
      param.setKernel(kernel);                        // use the gabor kernel
      filter.setParameters(param);                    // set parameters

      // filter the data and leave the result there too
      filter.apply(data);

Constructor & Destructor Documentation

template<class T>
lti::gaborKernel< T >::gaborKernel ( const int &  size,
const double &  theVariance,
const double &  frequency,
const double &  angle 
)

constructor

Parameters:
size is the number of elements pro dimension (i.e. the filter kern is a 'size x size' kernel!)
theVariance variance of the kernel
frequency the angular frequency to be modulated with (in radians per line)
angle the angle to modulate the gaussian function (in radians)

Member Function Documentation

template<class T>
void lti::gaborKernel< T >::generate ( const int &  size,
const double &  theVariance,
const double &  frequency,
const double &  angle 
)

initialize this kernel with the specified values

Parameters:
size size of the kernel in one dimension
theVariance variance of the kernel
frequency the angular frequency to be modulated with (in radians per line)
angle the angle to modulate the gaussian function (in radians)

The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:20 2010 for LTI-Lib by Doxygen 1.6.1