[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| Gabor Filter |

## Classes

class | GaborFilterFamily< ImageType, Alloc >
| Family of gabor filters of different scale and direction. More...

## Functions

double | angularGaborSigma (int directionCount, double centerFrequency)
| Calculate sensible angular sigma for given parameters.
template<... >
void | createGaborFilter (...)
| Create a gabor filter in frequency space.
double | radialGaborSigma (double centerFrequency)
| Calculate sensible radial sigma for given parameters.

## Detailed Description

Functions to create or apply gabor filter (latter based on FFTW).

## Function Documentation

void vigra::createGaborFilter | ( |  | ... | ) |

Create a gabor filter in frequency space.

The orientation is given in radians, the other parameters are the center frequency (for example 0.375 or smaller) and the two angular and radial sigmas of the gabor filter. (See angularGaborSigma() for an explanation of possible values.)

The energy of the filter is explicitly normalized to 1.0.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class DestImageIterator, class DestAccessor>
            void createGaborFilter(DestImageIterator destUpperLeft,
                                   DestImageIterator destLowerRight,
                                   DestAccessor da,
                                   double orientation, double centerFrequency,
                                   double angularSigma, double radialSigma)
        }

use argument objects in conjunction with Argument Object Factories :

        namespace vigra {
            template <class DestImageIterator, class DestAccessor>
            void createGaborFilter(triple<DestImageIterator,
                                          DestImageIterator,
                                          DestAccessor> dest,
                                   double orientation, double centerFrequency,
                                   double angularSigma, double radialSigma)
        }

Usage:

#include <vigra/gaborfilter.hxx>

Namespace: vigra

        vigra::FImage gabor(w,h);

        vigra::createGaborFilter(destImageRange(gabor), orient, freq,
                                 angularGaborSigma(directionCount, freq)
                                 radialGaborSigma(freq));

double vigra::radialGaborSigma | ( | double | centerFrequency | ) |

Calculate sensible radial sigma for given parameters.

For a brief introduction what is meant with "sensible" sigmas, see angularGaborSigma().

Declaration:

        namespace vigra {
            double radialGaborSigma(double centerFrequency)
        }

double vigra::angularGaborSigma | ( | int | directionCount,
|  | double | centerFrequency
| ) |  |

Calculate sensible angular sigma for given parameters.

"Sensible" means: If you use a range of gabor filters for feature detection, you are interested in minimal redundancy. This is hard to define but one possible try is to arrange the filters in frequency space, so that the half-peak-magnitude ellipses touch each other.

To do so, you must know the number of directions (first parameter for the angular sigma function) and the center frequency of the filter you want to calculate the sigmas for.

The exact formulas are:

        sigma_radial= 1/sqrt(ln(4)) * centerFrequency/3

        sigma_angular= 1/sqrt(ln(4)) * tan(pi/(directions*2))
     sqrt(8/9) * centerFrequency

Declaration:

        namespace vigra {
            double angularGaborSigma(int directionCount, double centerFrequency)
        }

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.9.0 (Tue Nov 6 2012)