NAME
gabor_jet -- unit to compute set of 2D Gabor responses to images
PROTOTYPE
unitptr gabor_jet( int iDx, int iDy, int iRings, int iOrients, float fAspect, float fBandWidth, float fMaxFrq, unitptr uHost)
ARGUMENTS
- int iDx
- Image width (in pixel)
- int iDy
- Image height (in pixel)
- int iRings
- Number of rings in frequency space (corresponds to the number of scales)
- int iOrients
- Number of orientations (over a full circle of 360 degrees for a positive value, over 180 degrees for a negative value)
- float fAspect
- Aspect ratio of Gabor filters
- float fBandWidth
- Bandwith of Gabors (1 corresponds to a bandwidth of 1 octave for the frequencies of upper and lower half-peak value)
- float fMaxFrq
- Maximum half-peak magnitude frequency in Gabor jet. (1 corresponds to a spatial frequency of 1 cycle per 2 pixels). Use a negative number to supress the opening of the status window.
- unitptr uHost
- Host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[iDx*iDy]:
- (packed input field 0) pixel values of source image
- CTL_in[8]:
- (input field 1) switches for certain parameters:
- Pin 0:
- Preprocessing before FFT is computed: 0 = nothing, 1 =
edge-extension (cf. fft_2d)
- Pin 1:
- Force zero mean: Each Gabor filter's value at (0,0) (in frequency
domain) is set to zero, i.e. the filters do not respond to regions with
constant intensity. (A value of 1 enables this feature, 0 disables it.)
- Pin 2:
- Status report. If not zero the number of the current processed
filter is printed to stderr.
- Pin 3:
- Controls type of output data. 0: Output holds response to even
symmetric part of Gabor. 1: Output holds response to odd symmetric part of
Gabor. 2: Output holds energy of Gabor response.
- X_out[iDx*iDy]:
- (packed output field 0) output of current filtered image.
- Y_out[6]:
- (output field 1) gives some information about current filtered
image: Pin 0 = Frequency of current Gabor (cycles per image width), Pin 1 =
Orientation (in degrees), Pin 2 = sigma of Gabor in frequency domain.
DESCRIPTION:
This unit computes a set of Gabor responses for the input image. The first
execution of the unit will start the computation. After the computation is
finished the first response image is copied to X_out. Each subsequent call
will now copy the next response image to the output. For visualization
issues a status window shows the set of 2D Gabor filters used for the
filterbank. Each circle represents the half-amplitude contour of the
corresponding Gaussian of the filter in the frequency domain. During
computation the circles are displayed in red. The filter corresponding to the
current output is highlighted lightblue.
A call of ctrl_unit(NST_RESET) resets the counter of the current response
image. The next exec_unit call will then give the first response image of the
set. A call of ctrl_unit(NST_INIT) enables the unit to recompute the Gabor
jet. The next exec call will then recompute the filter responses.
FILE
nst_fft2d.cc