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

lti::octagonalKernel< T > Class Template Reference

octagonal filter kernel More...

#include <ltiBinaryKernels.h>

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

List of all members.

Public Member Functions

 octagonalKernel (const int &size=3, const T &onValue=lti::typeInfo< T >::suggestedNorm()/T(255))
void generate (const int &size, const T &onValue=lti::typeInfo< T >::suggestedNorm()/T(255))

Detailed Description

template<class T = float>
class lti::octagonalKernel< T >

octagonal filter kernel

This binary filter kernel (values only 0 or 1) is used as a structuring element for erosion/dilation operations

The onValue is important if e.g. erosion::parameters::Gray is used. For Binary mode the exact value of onValue is not relevant. Default is typeInfo<T>::suggestedNorm()/255, i.e. 1 for ubyte and 0.003921 for float.

The possible sizes are all odd values greater/equal 3.

The kernel norm is set to the typeInfo<T>::suggestedNorm() so the result is the expected black and white image.

An example of an octagonal kernel of size seven:

          - - 1 1 1 - -
          - 1 1 1 1 1 -
          1 1 1 1 1 1 1
          1 1 1 1 1 1 1
          1 1 1 1 1 1 1
          - 1 1 1 1 1 -
          - - 1 1 1 - -

Constructor & Destructor Documentation

template<class T = float>
lti::octagonalKernel< T >::octagonalKernel ( const int &  size = 3,
const T &  onValue = lti::typeInfo< T >::suggestedNorm()/T(255) 
)

constructor

Parameters:
size is the dimension of the one dimensional part (i.e. the filter kern is a size x size kernel!) This must be an odd value greater/equal 3. If another value is given, the next valid odd value will be assumed.
onValue value different from zero in the kernel.

Member Function Documentation

template<class T = float>
void lti::octagonalKernel< T >::generate ( const int &  size,
const T &  onValue = lti::typeInfo< T >::suggestedNorm()/T(255) 
)

initialize this kernel with the specified values

Parameters:
size is the dimension of the one dimensional part (i.e. the filter kern is a size x size kernel!) This must be an odd value greater/equal 3. If another value is given, the next valid odd value will be assumed.
onValue value different from zero in the kernel.

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

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