eLynx SDK v3.3.0
C++ image processing API reference
Public Member Functions | Public Attributes

eLynx::Math::ConvolutionKernel< T > Struct Template Reference

Convolution kernel in W x H dimension, used with float and double resolution. More...

#include <ConvolutionKernel.h>

List of all members.

Public Member Functions

 ConvolutionKernel ()
 Default constructor.
 ConvolutionKernel (uint32 iWidth, uint32 iHeight, T iV=T(1))
 Constructor from size.
 ConvolutionKernel (uint32 iWidth, uint32 iHeight, const T *iprArray)
 Constructor from size.
 ConvolutionKernel (const ConvolutionKernel &iOther)
 Copy constructor from another kernel.
template<typename U >
 ConvolutionKernel (const ConvolutionKernel< U > &iOther)
 Copy constructor from another kernel type.
ConvolutionKerneloperator= (const ConvolutionKernel &iOther)
 Assignment operator with another kernel.
template<typename U >
ConvolutionKerneloperator= (const ConvolutionKernel< U > &iOther)
 Assignment operator with another kernel type.
uint32 GetSize () const
 Return the size of kernel, size = width * height.
uint32 GetWidth () const
 Return the width of kernel.
uint32 GetHeight () const
 Return the height of kernel.
GetSum () const
 Return the sum of all elements of kernel.
void Normalize ()
 Normalize elements so that sum of all elements equals 1.
ConvolutionKernel Rotated (const ECompassDirection iDirection) const
 Return a rotated convolution kernel NxN sized only for square kernel.
bool IsValid () const
 Return the height of kernel.
bool IsHorizontal () const
 Return if kernel is W x 1 sized.
bool IsVertical () const
 Return if kernel is 1 x H sized.
bool IsSquare () const
 Return if kernel is N x N sized.
bool Is3x3 () const
 Return if kernel is 3x3 sized.
bool Is5x5 () const
 Return if kernel is 5x5 sized.

Public Attributes

boost::shared_array< T > _spK
 matrix _width x _height of type T values.

Detailed Description

template<typename T>
struct eLynx::Math::ConvolutionKernel< T >

Convolution kernel in W x H dimension, used with float and double resolution.


Constructor & Destructor Documentation

template<typename T>
eLynx::Math::ConvolutionKernel< T >::ConvolutionKernel ( uint32  iWidth,
uint32  iHeight,
iV = T(1) 
)

Constructor from size.

Parameters:
iWidththe kernel width.
iHeightthe kernel height.
iVthe initial value for elements.
template<typename T>
eLynx::Math::ConvolutionKernel< T >::ConvolutionKernel ( uint32  iWidth,
uint32  iHeight,
const T *  iprArray 
)

Constructor from size.

Parameters:
iWidththe kernel width.
iHeightthe kernel height.
iprArraypointer on a array iW x iH of element values.
template<typename T>
eLynx::Math::ConvolutionKernel< T >::ConvolutionKernel ( const ConvolutionKernel< T > &  iOther )

Copy constructor from another kernel.

Parameters:
iOtherkernel to copy.
template<typename T>
template<typename U >
eLynx::Math::ConvolutionKernel< T >::ConvolutionKernel ( const ConvolutionKernel< U > &  iOther )

Copy constructor from another kernel type.

Parameters:
iOtherkernel to copy.

Member Function Documentation

template<typename T>
uint32 eLynx::Math::ConvolutionKernel< T >::GetHeight (  ) const

Return the height of kernel.

Returns:
The kernel's height in elements.
template<typename T>
uint32 eLynx::Math::ConvolutionKernel< T >::GetSize (  ) const

Return the size of kernel, size = width * height.

Returns:
The kernel's size in elements.
template<typename T>
T eLynx::Math::ConvolutionKernel< T >::GetSum (  ) const

Return the sum of all elements of kernel.

Returns:
The sum of all elements.
template<typename T>
uint32 eLynx::Math::ConvolutionKernel< T >::GetWidth (  ) const

Return the width of kernel.

Returns:
The kernel's width in elements.
template<typename T>
bool eLynx::Math::ConvolutionKernel< T >::Is3x3 (  ) const

Return if kernel is 3x3 sized.

Returns:
true is kernel is 3x3 sized, false otherwise.
template<typename T>
bool eLynx::Math::ConvolutionKernel< T >::Is5x5 (  ) const

Return if kernel is 5x5 sized.

Returns:
true is kernel is 5x5 sized, false otherwise.
template<typename T>
bool eLynx::Math::ConvolutionKernel< T >::IsHorizontal (  ) const

Return if kernel is W x 1 sized.

Returns:
true is kernel is horizontal, false otherwise.
template<typename T>
bool eLynx::Math::ConvolutionKernel< T >::IsSquare (  ) const

Return if kernel is N x N sized.

Returns:
true is kernel is squared, false otherwise.
template<typename T>
bool eLynx::Math::ConvolutionKernel< T >::IsVertical (  ) const

Return if kernel is 1 x H sized.

Returns:
true is kernel is vertical, false otherwise.
template<typename T>
template<typename U >
ConvolutionKernel& eLynx::Math::ConvolutionKernel< T >::operator= ( const ConvolutionKernel< U > &  iOther )

Assignment operator with another kernel type.

Parameters:
iOtherkernel to assign.
template<typename T>
ConvolutionKernel& eLynx::Math::ConvolutionKernel< T >::operator= ( const ConvolutionKernel< T > &  iOther )

Assignment operator with another kernel.

Parameters:
iOtherkernel to assign.
template<typename T>
ConvolutionKernel eLynx::Math::ConvolutionKernel< T >::Rotated ( const ECompassDirection  iDirection ) const

Return a rotated convolution kernel NxN sized only for square kernel.

Parameters:
iDirectionthe new direction relative to north.
Returns:
the rotated kernel.

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

Generated on Thu Dec 9 2010 by doxygen 1.7.2