OTB  7.4.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | 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
 
const ArrayTypeGetFilter ()
 
virtual const char * GetNameOfClass () const
 
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
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 GaborFilterGenerator ()
 
void GenerateFilter ()
 
void Modified () const override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~GaborFilterGenerator () override
 

Private Member Functions

 GaborFilterGenerator (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

PrecisionType m_A
 
PrecisionType m_B
 
ArrayType m_Filter
 
bool m_NeedToRegenerateFilter
 
PrecisionType m_Phi
 
RadiusType m_Radius
 
PrecisionType m_Theta
 
PrecisionType m_U0
 
PrecisionType m_V0
 

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

◆ ~GaborFilterGenerator()

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

◆ GaborFilterGenerator() [2/2]

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

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.

Referenced by otb::GaborFilterGenerator< TPrecision >::~GaborFilterGenerator().

◆ GetA()

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

Setters/Getters

◆ GetB()

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

Setters/Getters

◆ 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

Setters/Getters

◆ GetRadius()

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

Setters/Getters

◆ GetTheta()

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

Setters/Getters

◆ GetU0()

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

Setters/Getters

◆ GetV0()

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

Setters/Getters

◆ Modified()

template<class TPrecision >
void otb::GaborFilterGenerator< TPrecision >::Modified ( void  ) const
overrideprotected

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

Definition at line 78 of file otbGaborFilterGenerator.hxx.

Referenced by otb::GaborFilterGenerator< TPrecision >::~GaborFilterGenerator().

◆ New()

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

◆ operator=()

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

◆ 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.

Referenced by otb::GaborFilterGenerator< TPrecision >::~GaborFilterGenerator().

◆ 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

Setters/Getters

◆ SetPhi()

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

Setters/Getters

◆ SetRadius()

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

Setters/Getters

◆ SetTheta()

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

Setters/Getters

◆ SetU0()

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

Setters/Getters

◆ SetV0()

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

Setters/Getters

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

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

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

Definition at line 140 of file otbGaborFilterGenerator.h.

◆ m_U0

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

Definition at line 141 of file otbGaborFilterGenerator.h.

◆ m_V0

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

Definition at line 142 of file otbGaborFilterGenerator.h.


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