matlabgabor-filter

Which Gabor Orientation is "Horizontal"


I am attempting to implement a Gabor filter in Matlab in such a way that it discriminates "vertical" textures. Vertical textures means structures that run from top to bottom in the image. If this is difficult to visualize, picture a white wall with windows on it. I want to find the sides of the window frames, not the tops or bottoms. My understanding is that this should be described as a horizontal variation in contrast. Please correct any error in nomenclature. What I am trying to determine is whether this search for "vertical textures" calls for an orientation of 0 or 90. When I check the documentation for the gabor function it says this:

the orientation is defined as the normal direction to the sinusoidal plane wave.

But I cannot seem to grok that.

P.S. I know that other methods like find edge or difference of gaussians can do this too but suffice to say that I want to use gabor.


Solution

  • If you run the second example in the gabor documentation:

    https://www.mathworks.com/help/images/ref/gabor.html

    The direction of oscillation of the gabor kernel is the same as the direction of maximum response of periodic/texture content. So, 0 degrees would be activated by vertically oriented texture of the same wavelength as the gabor kernel.

    90 Degrees would be activated be horizontally oriented texture of the same wavelength.