latest version v1.9 - last update 10 Apr 2010 |
First order Oriented Gaussian Derivative. More...
#include <ltiOgdKernels.h>
Public Member Functions | |
ogd1Kernel () | |
ogd1Kernel (const int &size, const double &theVariance=1.4426950409, const double &theAngle=0.0) | |
void | generate (const int &size, const double &theVariance, const double &theAngle) |
void | generateBasisKernel (const int &whichBasis, const int &size, const double &theVariance) |
First order Oriented Gaussian Derivative.
OGD kernels are separable (one filter pair per basis kernel)!
You can create a "real" 2D kernel with the following code
lti::ogd1Kernel<float> ogd(5); // a kernel 5x5 with default variance // and angle lti::kernel2D<float> kern; // a 2D kernel; kern.outerProduct(ogd.getRowFilter(0),ogd.getColFilter(0));
The first basis filter of the first order OGD is:
and the second:
The used interpolation functions are and .
If you need to calculate several channels with different directions, calculate first the basis images and then use lti::ogd1Filter to combine them. This way is faster as to convolve each time the channel with the separable kernel.
lti::ogd1Kernel< T >::ogd1Kernel | ( | ) |
Default constructor.
Creates an empty kernel. To initialize use generate() or generateBasisKernel().
lti::ogd1Kernel< T >::ogd1Kernel | ( | const int & | size, | |
const double & | theVariance = 1.4426950409 , |
|||
const double & | theAngle = 0.0 | |||
) |
Constructor.
size | is the dimension of the one dimensional part (i.e. the kernel has dimensions size x size !) | |
theVariance | variance of the kernel | |
theAngle | used angle (in radians) |
void lti::ogd1Kernel< T >::generate | ( | const int & | size, | |
const double & | theVariance, | |||
const double & | theAngle | |||
) |
Initialize this kernel with the specified values.
size | is the dimension of the one dimensional part (i.e. the kernel has dimensions size x size !) | |
theVariance | variance of the kernel | |
theAngle | used angle (in radians) |
void lti::ogd1Kernel< T >::generateBasisKernel | ( | const int & | whichBasis, | |
const int & | size, | |||
const double & | theVariance | |||
) |
Initialize this kernel with the specified values.
whichBasis | the steerable filter basis (for ogd1 must be 0 or 1) | |
size | is the dimension of the one dimensional part (i.e. the kernel has dimensions size x size !) | |
theVariance | variance of the kernel |