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

lti::laplacianKernel Class Reference
[Linear filtering]

Two-dimensional kernels to compute the Laplacian. More...

#include <ltiLaplacianKernel.h>

Inheritance diagram for lti::laplacianKernel:
Inheritance graph
[legend]
Collaboration diagram for lti::laplacianKernel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 laplacianKernel (const int size=3)
void generate (const int size)

Detailed Description

Two-dimensional kernels to compute the Laplacian.

The Laplacian is defined as:

\[\nabla^2f = \frac{\partial^2f}{\partial x^2} + \frac{\partial^2f}{\partial y^2}\]

This class will create a two-dimensional filter kernel that can be applied with lti::convolution to any channel, in order to compute the Laplacian of that channel.

Please note that only kernels of "float" are provided, since ubyte channels cannot represent negative values.

There are three posibilities for the kernel dimensions 3x3, 5x5 or 9x9.

The 3x3 is the standard kernel:

  0    1    0
  1   -4    1
  0    1    0

There is another 3x3 Laplacian kernel based on a polynomial quadratic least-square-error surface passing through the 3x3 grid (this can generated giving the size "2" (from quadratic) ):

  0.2   0.1    0.2
  0.1  -1.2    0.1
  0.2   0.1    0.2

We designed kernel with following approach:

The 5x5 and 9x9 kernels are based on the gradient operators defined by Ando in its paper "Consistent Gradient Operators" (IEEE PAMI, Vol. 22, No. 3, March 2000). With this gradients, the operators for the second derivatives are computed and added. From the 3x3 gradient kernel is generated the 5x5 Laplacian one, and from the 5x5 kernel the 9x9 Laplacian one.

These kernels are not directly separable and therefore implemented as two-dimensional ones. You can approximate the separability with the separate() methods of the sepKernel<T> class.


Constructor & Destructor Documentation

lti::laplacianKernel::laplacianKernel ( const int  size = 3  ) 

constructor

Parameters:
size is the dimension of the one dimensional part (i.e. the filter kern is a size x size kernel!) The valid values are 2, 3, 5 or 9. If an invalid value is given, an empty kernel will be created. Note that "2" generates the 3x3 "quadratic" kernel approximation.

Member Function Documentation

void lti::laplacianKernel::generate ( const int  size  ) 

Initialize this kernel with the specified values.

Parameters:
size size of the kernel in one dimension. The valid values are 3, 5 or 9. If an invalid value is given, an empty kernel will be created.

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

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