Skip to main content

MgenGabor

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Generate a Log-Gabor filter and its Hilbert transform.

Syntax

void MgenGabor(
AIL_ID ContextId, //in
AIL_ID GaborDestId, //out
AIL_ID HilbertDestId, //out
AIL_DOUBLE Param1, //in
AIL_DOUBLE Param2, //in
AIL_DOUBLE Param3, //in
AIL_DOUBLE Param4, //in
AIL_DOUBLE Param5, //in
AIL_INT Normalization, //in
AIL_INT DCComponentPosition, //in
AIL_INT ControlFlag //in
)

Description

This function generates a Log-Gabor filter and its Hilbert transformation using the following equation:

[Image: MgenGaborEquation.png]

This function writes the Log-Gabor filter and its Hilbert transformation to the specified image buffers in the frequency domain.

The Log-Gabor filter is useful for filtering out specific frequencies at a specified angle in images.

To apply the Log-Gabor filter to an image, the image must be in the frequency domain. You can perform a forward Fourier transform on an image, using MimTransform with M_FFT and M_FORWARD. You can apply the Log-Gabor filter to the transformed source image, using MimArith. Then, you can reverse the Fourier transform, using MimTransform with M_FFT and M_REVERSE, and display the filtered image.

Parameters

ContextId (in, AIL_ID)

Specifies the type of context.

GaborDestId (out, AIL_ID)

Specifies the identifier of the destination image buffer in which to write the Log-Gabor filter.

For specifying the image buffer in which to write the Log-Gabor filter

ValueDescription
Image buffer identifierSpecifies the image buffer in which to write the Log-Gabor filter. The image buffer must be a 1-band, 32-bit processable float buffer.

HilbertDestId (out, AIL_ID)

Specifies the identifier of the destination image buffer in which to write the Hilbert transform of the Log-Gabor filter.

For specifying the image buffer in which to write the Hilbert transform

ValueDescription
M_NULLSpecifies to not store the Hilbert transform in an image buffer.
Image buffer identifierSpecifies the image buffer in which to write the Hilbert transform. The image buffer must be a 1-band, 32-bit processable float buffer.

Param1 (in, AIL_DOUBLE)

Specifies the center orientation (_θ0 _) of the Gabor filter.

Param2 (in, AIL_DOUBLE)

Specifies the center frequency (_f0 _) of the Log-Gabor filter.

Param3 (in, AIL_DOUBLE)

Specifies the width parameter for the frequency (_σr _) of the Log-Gabor filter.

Param4 (in, AIL_DOUBLE)

Specifies the width parameter for the orientation (_σa _) of the Log-Gabor filter.

Param5 (in, AIL_DOUBLE)

Reserved for future use and must be set to M_NULL.

Normalization (in, AIL_INT)

Specifies the normalization factor applied to all values of the filters.

For specifying the Normalization factor

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to not use a normalization factor.
M_NORMALIZESpecifies to use a normalization factor. The normalization factor is defined as the SizeX multiplied by the SizeY of the image buffer specified by the GaborDestId parameter.

DCComponentPosition (in, AIL_INT)

Specifies the position of the DC Component.

For specifying the position of the DC component

ValueDescription
M_DEFAULT
M_CENTERSpecifies that the DC component is located at the center.
M_TOP_LEFT (default)Specifies that the DC component is located at the top left corner.

ControlFlag (in, AIL_INT)

Reserved for future use and must be set to M_DEFAULT.

Parameter Associations

For selecting the Gabor filter


M_LOG_GABOR_FREQUENTIAL_CONTEXT_DEFAULT

Specifies a predefined Log-Gabor frequential filter context.

ValueDescription
0.0 <= Value <= 180.0Specifies the center angle.
0.0 < Value <= 0.75Specifies the center frequency.
Value > 0.0Specifies the width parameter for the frequency.
Value > 0.0Specifies the width parameter for the orientation.
Copyright © 2026 Zebra Technologies.