latest version v1.9 - last update 10 Apr 2010 |
Two-dimensional separable filter kernels for the gradient approximation. More...
#include <ltiGradientKernels.h>
Public Member Functions | |
gradientKernelY (const int &size=3) | |
void | generate (const int &size) |
Two-dimensional separable filter kernels for the gradient approximation.
This class will create a two-dimensional gradientian filter kernel.
There are three posibilities for the kernel dimensions 3x3, 4x4 or 5x5. The approximation is done using the suggestions of Ando in its paper "Consistent Gradient Operators" (IEEE PAMI, Vol. 22, No. 3, March 2000)
These suggested kernels are separable and are of course implemented that way (much faster!)
This object will correspond to the derivative respect the y-Axis. For the x-Axis just exchange the 1D filter kernels, or use the lti::gradientKernelX .
The template parameter T should be the same as the value_type of the matrix or channel to be filtered (channel::value_type, double, etc.)
It is recomended to use this kernels with floating point matrices or channels, due to precision aspects.
lti::gradientKernelY< T >::gradientKernelY | ( | const int & | size = 3 |
) |
constructor
size | is the dimension of the one dimensional part (i.e. the filter kern is a size x size kernel!) The valid values are 3, 4 or 5. If an invalid value is given, an empty kernel will be created. |
void lti::gradientKernelY< T >::generate | ( | const int & | size | ) |
initialize this kernel with the specified values
size | size of the kernel in one dimension. |