主要内容

加博尔

创建Gabor过滤器或Gabor过滤器库

描述

A加博尔object represents a linear Gabor filter that is sensitive to textures with a specified wavelength and orientation.

You can use the加博尔function to create a single Gabor filter or a Gaborfilter bank。A filter bank is a set of filters that represent combinations of multiple wavelengths, orientations, and other optional parameters. For example, if you specify two wavelengths and three orientations, then the Gabor filter bank consists of six filters for each combination of wavelength and orientation.

To apply a Gabor filter or a Gabor filter bank to an image, use theimgaborfiltfunction.

Creation

描述

example

g= gabor(Wavelength,Orientation)creates a Gabor filter and sets theWavelengthOrientationproperties with the wavelength and orientation of the filter.

如果指定Wavelength或者Orientation作为向量,然后加博尔功能创建一个数组加博尔objects that contain all the unique combinations ofWavelengthOrientation

g= gabor(波长,方向,Name,Value)also uses name-value pairs to set one or both of theSpatialFrequencyBandwidth空间镜properties. You can specify multiple name-value pairs. Enclose each property name in quotes.

如果指定SpatialFrequencyBandwidth或者空间镜作为向量,然后加博尔功能创建一个数组加博尔objects that represent all combinations of the input argument values.

例子:gabor(波长,方向,'spatialfrequencybandwidth',2)creates a Gabor filter with a spatial frequency bandwidth of two octaves.

Properties

expand all

Wavelength of the sinusoidal carrier, specified as a numeric scalar or numeric vector with values greater than or equal to 2, in pixels/cycle. Typical values ofWavelengthrange from 2 up to the hypotenuse length of the input image[1]

You cannot change theWavelength创建属性加博尔目的。

滤波器的方向, specified as a numeric scalar or numeric vector with values in the range [0, 360]. The orientation is defined as the normal direction to the sinusoidal plane wave.

如果您仅对Gabor幅度响应感兴趣,请限制Orientationto [0, 180].

You cannot change theOrientation创建属性加博尔目的。

八度单位的空间频率带宽,指定为正数或正数的向量。空间频率带宽决定了滤波器响应的截止,因为输入图像中的频率内容因首选频率而异,1/lambda。空间频率带宽的典型值在[0.5,2.5]范围内。

You cannot change theSpatialFrequencyBandwidth创建属性加博尔目的。

高斯包膜的半隔轴和半轴轴的比率(semiminor/semimajor),指定为正数或正数的向量。该属性控制着高斯信封的椭圆度。空间纵横比的典型值在[0.23,0.92]范围内。

You cannot change the空间镜创建属性加博尔目的。

此属性仅阅读。

Spatial kernel, specified as a numeric matrix.

例子

全部收缩

创建棋盘的示例图像。

a =棋盘(20);

创建一系列Gabor过滤器。

波长= 20; orientation = [0 45 90 135]; g = gabor(wavelength,orientation);

将过滤器应用于棋盘图像。

outMag = imgaborfilt(A,g);

显示结果。

uppize = size(outmag);outmag = reshape(outmag,[outsize(1:2),1,upstize(3)]);图,蒙太奇(Outmag,'DisplayRange',[]);标题('Montage of gabor magnitude output images.');

Figure contains an axes object. The axes object with title Montage of gabor magnitude output images. contains an object of type image.

创建Gabor过滤器数组。

g = gabor([5 10],[0 90]);

Visualize the real part of the spatial convolution kernel of each Gabor filter in the array.

figure; subplot(2,2,1)forp = 1:长度(g)子图(2,2,p);imshow(real(g(p).spatialkernel),[]);lambda = g(p).Wavelength;theta = g(p)。取向;标题(sprintf(sprintf)('Re[h(x,y)], \\lambda = %d, \\theta = %d',lambda,theta));end

Figure contains 4 axes objects. Axes object 1 with title R e [ h ( x , y ) ] , blank lambda blank = blank 5 , blank theta blank = blank 0 contains an object of type image. Axes object 2 with title R e [ h ( x , y ) ] , blank lambda blank = blank 1 0 , blank theta blank = blank 0 contains an object of type image. Axes object 3 with title R e [ h ( x , y ) ] , blank lambda blank = blank 5 , blank theta blank = blank 9 0 contains an object of type image. Axes object 4 with title R e [ h ( x , y ) ] , blank lambda blank = blank 1 0 , blank theta blank = blank 9 0 contains an object of type image.

参考

[1]Jain, Anil K., and Farshid Farrokhnia. "Unsupervised Texture Segmentation Using Gabor Filters."Pattern Recognition24, no. 12 (January 1991): 1167–86. https://doi.org/10.1016/0031-3203(91)90143-S.

版本历史

在R2015B中引入