The GABOR_KERNEL function constructs a Gabor transform filter kernel, for use in the GABOR_FILTER routine. The Gabor filter consists of a sinusoidal wave in a particular orientation, with a Gaussian envelope that limits the effect to a localized region around each point in the image. The filter is useful for edge detection and texture analysis.

This routine is written in the IDL language. Its source code can be found in the file gabor_kernel.pro in the lib subdirectory of the IDL distribution.

Example


Call the function with sample parameters:

IDL> kernel = gabor_kernel(sigma=1.25, lambda=2.0)
IDL> help, kernel
KERNEL          DCOMPLEX  = Array[9, 9]
IDL> float(kernel), format='(9f6.2)'
0.00 -0.00  0.00 -0.00  0.01 -0.00  0.00 -0.00  0.00
0.00 -0.00  0.02 -0.04  0.06 -0.04  0.02 -0.00  0.00
0.00 -0.02  0.08 -0.20  0.28 -0.20  0.08 -0.02  0.00
0.00 -0.04  0.20 -0.53  0.73 -0.53  0.20 -0.04  0.00
0.01 -0.06  0.28 -0.73  1.00 -0.73  0.28 -0.06  0.01
0.00 -0.04  0.20 -0.53  0.73 -0.53  0.20 -0.04  0.00
0.00 -0.02  0.08 -0.20  0.28 -0.20  0.08 -0.02  0.00
0.00 -0.00  0.02 -0.04  0.06 -0.04  0.02 -0.00  0.00
0.00 -0.00  0.00 -0.00  0.01 -0.00  0.00 -0.00  0.00

Syntax


Result = GABOR_KERNEL( LAMBDA=value, PSI=value, SIGMA=value, THETA=value)

Return Value


Returns a two-dimensional double complex array containing the kernel.

Arguments


None

Keywords


GAMMA

Set this keyword to a floating-point number giving the spatial aspect ratio (or ellipticity) between the X and Y. A value less than 1 gives a smaller spatial extent in X compared to Y, while a value greater than 1 gives a larger spatial extent in X. The default is 1.

LAMBDA

Set this keyword to a floating-point number giving the wavelength (the width) of the sinusoidal pattern in the filter. The default is 1.

PSI

Set this keyword to a floating-point number giving the phase offset in radians of the sinusoidal pattern in the filter. The default is 0. A phase offset of 0 will give the largest filter response at the center of symmetric features such as lines, while a phase offset of !pi/2 will give the largest response at the center of asymmetric features such as edges.

SIGMA

Set this keyword to a floating-point number giving the standard deviation (the width) of the Gaussian envelope. A larger sigma value increases the width and includes more sinusoidal waves in the filter. The default is 1.

THETA

Set this keyword to a floating-point number giving the orientation in radians of the parallel stripes of the filter. A value of 0.0 will orient the stripes in the vertical direction, while a value of Pi/2 will orient the stripes in the horizontal direction. Positive theta values will rotate the kernel in a counterclockwise direction, when displayed in the default IDL way where the first row is at the bottom of the window. The default is 0.

Examples


See GABOR_FILTER for a complete example.

Version History


8.9

Introduced

See Also


CONVOL, GABOR_FILTER, Image Processing Routines