OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::GaborFilterGenerator< TPrecision > Class Template Reference

#include <otbGaborFilterGenerator.h>

+ Inheritance diagram for otb::GaborFilterGenerator< TPrecision >:
+ Collaboration diagram for otb::GaborFilterGenerator< TPrecision >:

Public Types

typedef itk::Array< PrecisionTypeArrayType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPrecision PrecisionType
 
typedef itk::Size< 2 > RadiusType
 
typedef GaborFilterGenerator Self
 
typedef itk::Object Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 
RadiusType m_Radius
 
PrecisionType m_A
 
PrecisionType m_B
 
PrecisionType m_Theta
 
PrecisionType m_U0
 
PrecisionType m_V0
 
PrecisionType m_Phi
 
ArrayType m_Filter
 
bool m_NeedToRegenerateFilter
 
virtual void SetA (PrecisionType _arg)
 
virtual PrecisionType GetA ()
 
virtual void SetB (PrecisionType _arg)
 
virtual PrecisionType GetB ()
 
virtual void SetTheta (PrecisionType _arg)
 
virtual PrecisionType GetTheta ()
 
virtual void SetPhi (PrecisionType _arg)
 
virtual PrecisionType GetPhi ()
 
virtual void SetU0 (PrecisionType _arg)
 
virtual PrecisionType GetU0 ()
 
virtual void SetV0 (PrecisionType _arg)
 
virtual PrecisionType GetV0 ()
 
virtual void SetRadius (RadiusType _arg)
 
virtual const RadiusTypeGetRadius () const
 
const ArrayTypeGetFilter ()
 
 GaborFilterGenerator ()
 
 ~GaborFilterGenerator () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void GenerateFilter ()
 
void Modified () const override
 
 GaborFilterGenerator (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TPrecision>
class otb::GaborFilterGenerator< TPrecision >

This class allows generating a gabor filter convolution mask. The mask is stored in a linear buffer of type itk::Array returned by the GetFilter() method.

When calling the GetFilter() method, if the filter has to be regenerated, it will be done seamlessly.

Gabor filters are commonly used in image processing for textures description for instance The complex Gabor function is the product in spatial domain of a complex sinusoidal, also known as the carrier, and a gaussian-shaped function, also knwown as the envelop.

Please note that this helper class generates a filter whose coefficients are the real part of a complex Gabor function.

The formula used to compute these coefficients is as follows:

$ g(x, y) = \exp\Big(-\pi((a x_\theta)^{2} +(b y_\theta)^{2})\Big) * \cos\big(2\pi(u_0*x + v_0*y)+\phi\big) $

with:

$ x_\theta = x \cos(\theta)+y \sin(\theta) $ and $ y_\theta = y \cos(\theta)-x \sin(\theta) $

Where:

Definition at line 73 of file otbGaborFilterGenerator.h.

Member Typedef Documentation

◆ ArrayType

template<class TPrecision >
typedef itk::Array<PrecisionType> otb::GaborFilterGenerator< TPrecision >::ArrayType

Definition at line 88 of file otbGaborFilterGenerator.h.

◆ ConstPointer

template<class TPrecision >
typedef itk::SmartPointer<const Self> otb::GaborFilterGenerator< TPrecision >::ConstPointer

Definition at line 80 of file otbGaborFilterGenerator.h.

◆ Pointer

template<class TPrecision >
typedef itk::SmartPointer<Self> otb::GaborFilterGenerator< TPrecision >::Pointer

Definition at line 79 of file otbGaborFilterGenerator.h.

◆ PrecisionType

template<class TPrecision >
typedef TPrecision otb::GaborFilterGenerator< TPrecision >::PrecisionType

Definition at line 84 of file otbGaborFilterGenerator.h.

◆ RadiusType

template<class TPrecision >
typedef itk::Size<2> otb::GaborFilterGenerator< TPrecision >::RadiusType

Definition at line 89 of file otbGaborFilterGenerator.h.

◆ Self

template<class TPrecision >
typedef GaborFilterGenerator otb::GaborFilterGenerator< TPrecision >::Self

Definition at line 77 of file otbGaborFilterGenerator.h.

◆ Superclass

template<class TPrecision >
typedef itk::Object otb::GaborFilterGenerator< TPrecision >::Superclass

Definition at line 78 of file otbGaborFilterGenerator.h.

Constructor & Destructor Documentation

◆ GaborFilterGenerator() [1/2]

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::GaborFilterGenerator
protected

constructor

Definition at line 31 of file otbGaborFilterGenerator.hxx.

◆ ~GaborFilterGenerator()

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::~GaborFilterGenerator ( )
inlineoverrideprotected

destructor

Definition at line 116 of file otbGaborFilterGenerator.h.

◆ GaborFilterGenerator() [2/2]

template<class TPrecision >
otb::GaborFilterGenerator< TPrecision >::GaborFilterGenerator ( const Self )
privatedelete

Radius of the filter

Member Function Documentation

◆ CreateAnother()

template<class TPrecision >
virtual::itk::LightObject::Pointer otb::GaborFilterGenerator< TPrecision >::CreateAnother ( void  ) const

◆ GenerateFilter()

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::GenerateFilter
protected

Generate the filter coefficients

Definition at line 53 of file otbGaborFilterGenerator.hxx.

References otb::CONST_2PI, otb::CONST_PI, and otb::CONST_PI_180.

◆ GetA()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetA ( )
virtual

Radius of the filter

◆ GetB()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetB ( )
virtual

Radius of the filter

◆ GetFilter()

template<class TPrecision >
const GaborFilterGenerator< TPrecision >::ArrayType & otb::GaborFilterGenerator< TPrecision >::GetFilter

Get The generated filter

Definition at line 43 of file otbGaborFilterGenerator.hxx.

◆ GetNameOfClass()

template<class TPrecision >
virtual const char* otb::GaborFilterGenerator< TPrecision >::GetNameOfClass ( ) const
virtual

◆ GetPhi()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetPhi ( )
virtual

Radius of the filter

◆ GetRadius()

template<class TPrecision >
virtual const RadiusType& otb::GaborFilterGenerator< TPrecision >::GetRadius ( ) const
virtual

Radius of the filter

◆ GetTheta()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetTheta ( )
virtual

Radius of the filter

◆ GetU0()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetU0 ( )
virtual

Radius of the filter

◆ GetV0()

template<class TPrecision >
virtual PrecisionType otb::GaborFilterGenerator< TPrecision >::GetV0 ( )
virtual

Radius of the filter

◆ Modified()

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::Modified
overrideprotected

Reimplement the Modified() method to set the NeedToGenerateFilter to true

Definition at line 78 of file otbGaborFilterGenerator.hxx.

◆ New()

template<class TPrecision >
static Pointer otb::GaborFilterGenerator< TPrecision >::New ( )
static

◆ operator=()

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::operator= ( const Self )
privatedelete

Radius of the filter

◆ PrintSelf()

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 85 of file otbGaborFilterGenerator.hxx.

◆ SetA()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetA ( PrecisionType  _arg)
virtual

Setters/Getters

◆ SetB()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetB ( PrecisionType  _arg)
virtual

Radius of the filter

◆ SetPhi()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetPhi ( PrecisionType  _arg)
virtual

Radius of the filter

◆ SetRadius()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetRadius ( RadiusType  _arg)
virtual

Radius of the filter

◆ SetTheta()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetTheta ( PrecisionType  _arg)
virtual

Radius of the filter

◆ SetU0()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetU0 ( PrecisionType  _arg)
virtual

Radius of the filter

◆ SetV0()

template<class TPrecision >
virtual void otb::GaborFilterGenerator< TPrecision >::SetV0 ( PrecisionType  _arg)
virtual

Radius of the filter

Member Data Documentation

◆ m_A

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_A
private

Gabor parameters

Definition at line 138 of file otbGaborFilterGenerator.h.

◆ m_B

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_B
private

Radius of the filter

Definition at line 139 of file otbGaborFilterGenerator.h.

◆ m_Filter

template<class TPrecision >
ArrayType otb::GaborFilterGenerator< TPrecision >::m_Filter
private

Output filter coefficient array

Definition at line 146 of file otbGaborFilterGenerator.h.

◆ m_NeedToRegenerateFilter

template<class TPrecision >
bool otb::GaborFilterGenerator< TPrecision >::m_NeedToRegenerateFilter
mutableprivate

Whether we need to regenerate the filter

Definition at line 149 of file otbGaborFilterGenerator.h.

◆ m_Phi

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_Phi
private

Radius of the filter

Definition at line 143 of file otbGaborFilterGenerator.h.

◆ m_Radius

template<class TPrecision >
RadiusType otb::GaborFilterGenerator< TPrecision >::m_Radius
private

Radius of the filter

Definition at line 135 of file otbGaborFilterGenerator.h.

◆ m_Theta

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_Theta
private

Radius of the filter

Definition at line 140 of file otbGaborFilterGenerator.h.

◆ m_U0

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_U0
private

Radius of the filter

Definition at line 141 of file otbGaborFilterGenerator.h.

◆ m_V0

template<class TPrecision >
PrecisionType otb::GaborFilterGenerator< TPrecision >::m_V0
private

Radius of the filter

Definition at line 142 of file otbGaborFilterGenerator.h.


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