NAME

make_gabor -- generate Gabor filter in frequency domain

PROTOTYPE

unitptr make_gabor( int iDx, int iDy, unitptr uHost)

ARGUMENTS

int iDx
Width of filter
int iDy
Height of filter
unitptr uHost
Host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

CTL_in[5]:
(input field 0) switches for some parameters:
Pin 0: Spatial frequency of Gabor filter (fFrq) Pin 1: Orientation to which filter is optimally tuned (in degrees) (fOri) Pin 2: Aspect ratio of filter (fAsp) Pin 3: Width of Gaussian envelope (corresponds to size of Gabor filter) (fSigma) Pin 4: Type of filter (0=even, 1=odd)
X_out[2*iDx*iDy]:
(packed output field 0) complex filter data

DESCRIPTION:

Generates a 2D Gabor filter in frequency domain consisting of two Gaussians:

G(u,v) = exp(-(1/fSigma^2) * (u1'^2+fAsp*v1'^2)) + exp(-(1/fSigma^2) * (u2'^2+fAsp*v2'^2)) for an even and G(u,v) = i(exp(-(1/fSigma^2) * (u1'^2+fAsp*v1'^2)) - exp(-(1/fSigma^2) * (u2'^2+fAsp*v2'^2))) for an odd 2D Gabor filter, where u1', v1', and u2', v2' describe the two centers of the Gaussians in the rotated coordinate frame: u1' = (u-u0)*cos(fOri) - (v-v0)*sin(fOri), v1' = (u-u0)*sin(fOri) + (v-v0)*cos(fOri), u2' = (u+u0)*cos(fOri) - (v+v0)*sin(fOri), v2' = (u+u0)*sin(fOri) + (v+v0)*cos(fOri), and u0 = fFrq*cos(fOri), v0 = fFrq*sin(fOri). For a visualization see the provided example coming with this unit and that for the frq_filter.

STATUS:

preliminary

SEE ALSO:

frq_filter

FILE

nst_fft2d.cc