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

GaborFilterFamily< ImageType, Alloc > Class Template Reference

Family of gabor filters of different scale and direction. More...

`#include <vigra/gaborfilter.hxx>`

Inheritance diagram for GaborFilterFamily< ImageType, Alloc >:

## Public Member Functions

int | directionCount () const
int | filterIndex (int direction, int scale) const
| GaborFilterFamily (const Diff2D &size, int directionCount=stdDirectionCount, int scaleCount=stdScaleCount, double maxCenterFrequency=3.0/8.0, Alloc const &alloc=Alloc())
| GaborFilterFamily (int width=stdFilterSize, int height=-1, int directionCount=stdDirectionCount, int scaleCount=stdScaleCount, double maxCenterFrequency=3.0/8.0, Alloc const &alloc=Alloc())
ImageType const & | getFilter (int direction, int scale) const
double | maxCenterFrequency ()
virtual void | resizeImages (const Diff2D &newSize)
int | scaleCount () const
void | setDirectionScaleCounts (int directionCount, int scaleCount)
void | setMaxCenterFrequency (double maxCenterFrequency)
Public Member Functions inherited from ImageArray< ImageType, Alloc >
reference | back ()
const_reference | back () const
iterator | begin ()
const_iterator | begin () const
size_type | capacity () const
void | clear ()
bool | empty ()
iterator | end ()
const_iterator | end () const
iterator | erase (iterator begin, iterator end)
iterator | erase (iterator pos)
reference | front ()
const_reference | front () const
template<class InputIterator >
| ImageArray (InputIterator begin, InputIterator end, Alloc const &alloc=Alloc())
| ImageArray (unsigned int numImages, const Diff2D &imageSize, Alloc const &alloc=Alloc())
| ImageArray (unsigned int numImages, const ImageType &image, Alloc const &alloc=Alloc())
| ImageArray (unsigned int numImages=0, Alloc const &alloc=Alloc())
Size2D | imageSize () const
iterator | insert (iterator pos, const_reference image)
template<class InputIterator >
void | insert (iterator pos, InputIterator begin, InputIterator end)
void | insert (iterator pos, size_type count, const_reference image)
size_type | max_size () const
bool | operator== (const ImageArray< ImageType, Alloc > &other)
reference | operator[] (size_type index)
const_reference | operator[] (size_type index) const
void | pop_back ()
void | push_back (const_reference image)
reverse_iterator | rbegin ()
const_reverse_iterator | rbegin () const
reverse_iterator | rend ()
const_reverse_iterator | rend () const
void | reserve (size_type n)
void | resize (size_type newSize)
void | resize (size_type newSize, ImageType &image)
void | resizeImages (int width, int height)
size_type | size () const
void | swap (const_reference other)

## Additional Inherited Members

Public Types inherited from ImageArray< ImageType, Alloc >
typedef ImageType | value_type

## Detailed Description

template<class ImageType, class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>
class vigra::GaborFilterFamily< ImageType, Alloc >

Family of gabor filters of different scale and direction.

A GaborFilterFamily can be used to quickly create a whole family of gabor filters in frequency space. Especially useful in conjunction with applyFourierFilterFamily, since it's derived from ImageArray.

The filter parameters are chosen to make the center frequencies decrease in octaves with increasing scale indices, and to make the half-peak-magnitude ellipses touch each other to somewhat reduce redundancy in the filter answers. This is done by using angularGaborSigma() and radialGaborSigma(), you'll find more information there.

The template parameter ImageType should be a scalar image type suitable for filling in

#include <vigra/gaborfilter.hxx>
Namespace: vigra

## Constructor & Destructor Documentation

## ◆ GaborFilterFamily() [1/2]

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

GaborFilterFamily | ( | const Diff2D & | size,
|  | int | directionCount = `stdDirectionCount`,
|  | int | scaleCount = `stdScaleCount`,
|  | double | maxCenterFrequency = `3.0/8.0`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Constructs a family of gabor filters in frequency space. The filters will be calculated on construction, so it makes sense to provide good parameters right now although they can be changed later, too. If you leave them out, the defaults are a directionCount of 6, a scaleCount of 4 and a maxCenterFrequency of 3/8(=0.375).

## ◆ GaborFilterFamily() [2/2]

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

GaborFilterFamily | ( | int | width = `stdFilterSize`,
|  | int | height = `-1`,
|  | int | directionCount = `stdDirectionCount`,
|  | int | scaleCount = `stdScaleCount`,
|  | double | maxCenterFrequency = `3.0/8.0`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Convenience variant of the above constructor taking width and height separately. Also, this one serves as default constructor constructing 128x128 pixel filters.

## Member Function Documentation

## ◆ filterIndex()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

int filterIndex | ( | int | direction,
|  | int | scale
| ) |  | const

Return the index of the filter with the given direction and scale in this ImageArray. direction must in the range 0..directionCount()-1 and scale in the range 0..rangeCount()-1. This is useful for example if you used applyFourierFilterFamily() and got a resulting ImageArray which still has the same order of images, but no getFilter() method anymore.

## ◆ getFilter()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

ImageType const & getFilter | ( | int | direction,
|  | int | scale
| ) |  | const

Return the filter with the given direction and scale. direction must in the range 0..directionCount()-1 and scale in the range 0..rangeCount()-1. `filters.getFilter(direction, scale)` is the same as `filters[filterIndex(direction, scale)]`.

## ◆ resizeImages()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

virtual void resizeImages | ( | const Diff2D & | newSize | ) |

virtual

Resize all filters (causing their recalculation).

Reimplemented from ImageArray< ImageType, Alloc >.

## ◆ scaleCount()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

int scaleCount | ( |  | ) | const

Query the number of filter scales available.

## ◆ directionCount()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

int directionCount | ( |  | ) | const

Query the number of filter directions available.

## ◆ setDirectionScaleCounts()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

void setDirectionScaleCounts | ( | int | directionCount,
|  | int | scaleCount
| ) |  |

Change the number of directions / scales. This causes the recalculation of all filters.

## ◆ maxCenterFrequency()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

double maxCenterFrequency | ( |  | ) |

Return the center frequency of the filter(s) with scale==0. Filters with scale>0 will have a center frequency reduced in octaves: `centerFrequency= maxCenterFrequency / 2.0^scale`

## ◆ setMaxCenterFrequency()

template<class ImageType , class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>

void setMaxCenterFrequency | ( | double | maxCenterFrequency | ) |

Change the center frequency of the filter(s) with scale==0. See maxCenterFrequency().

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

- vigra/gaborfilter.hxx

© 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.12.1