iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Convolution Kernels

Functions to define kernels that can be used to filter images.

See Also
Image Filtering

Functions

template<class T >
Image< PixGray< T > > nrt::binomialKernel (int const size)
 Create a 1D binomial distribution kernel (shape of size-by-1). More...
 
template<class T >
Image< PixGray< T > > nrt::gaborKernel (float const scale, float const theta)
 Create a Gabor kernel with a a given scale and angle (in radians) More...
 
template<class T >
Image< PixGray< T > > nrt::gaborKernel (const float stddev, const float period, const float phase, const float theta, const float bg=0.0f, const float ampl=1.0f)
 Create a Gabor kernel. More...
 
template<class T >
Image< PixGray< T > > nrt::morphologyKernel (int size, bool const disk)
 Create a Morphological kernel with a given size. More...
 

Function Documentation

template<class T >
Image< PixGray< T > > nrt::binomialKernel ( int const  size)

Create a 1D binomial distribution kernel (shape of size-by-1).

The binomial kernel is often used for low pass filtering, as it offers a very good approximation to a Gaussian and has nice signal processing properties. The kernels returned by this method are normalized to sum to 1.

Note
While this method takes a template parameter for the numerical type, all internal operations are done in double precision.

Definition at line 45 of file KernelsImpl.H.

References nrt::None.

template<class T >
Image< PixGray< T > > nrt::gaborKernel ( float const  scale,
float const  theta 
)

Create a Gabor kernel with a a given scale and angle (in radians)

A Gabor kernel is a 2D Gaussian modulated by rotated sinusoidal plane. Filtering with a Gabor will create result in a map with high response to edges which are oriented near the same angle as the kernel.

See Also
gaborKernel(const float stddev, const float period, const float phase, const float theta, const float bg, const float ampl)

Definition at line 95 of file KernelsImpl.H.

References nrt::None, and nrt::Image< T, Flags >::pod_begin().

template<class T >
Image< PixGray< T > > nrt::gaborKernel ( const float  stddev,
const float  period,
const float  phase,
const float  theta,
const float  bg = 0.0f,
const float  ampl = 1.0f 
)

Create a Gabor kernel.

See Also
gaborKernel(float const scale, float const theta)

Definition at line 64 of file KernelsImpl.H.

References nrt::None, and nrt::Image< T, Flags >::pod_begin().

template<class T >
Image< PixGray< T > > nrt::morphologyKernel ( int  size,
bool const  disk 
)

Create a Morphological kernel with a given size.

A Morphological kernel is a 2D binary image.

Definition at line 126 of file KernelsImpl.H.

References nrt::Image< T, Flags >::begin(), and nrt::None.

Referenced by nrt::close(), nrt::dilate(), nrt::erode(), and nrt::open().