介绍

我们已经知道,傅里叶变换是一种信号处理中的有力工具,可以帮助我们将图像从空域转换到频域,并提取到空域上不易提取的特征。但是经过傅里叶变换后,图像在不同位置的频度特征往往混合在一起,但是Gabor滤波器却可以抽取空间局部频度特征,是一种有效的纹理检测工具。
Figure 1: A sinusoid and it's Fourier spectrum

如何生成一个Gabor滤波器

在二维空间中,使用一个三角函数(如正弦函数)与一个高斯函数叠加我们就得到了一个Gabor滤波器[1],如下图。

Figure 2: Gabor filter composition: (a) 2D sinusoid oriented at 30◦ with the x-axis, (b) a Gaussian kernel, (c) the corresponding Gabor filter. Notice how the sinusoid becomes spatially localized.

Gabor核函数

二维Gabor核函数由一个高斯函数和一个余弦函数相乘得出,其中θ,ϕ,γ,λ,σθ,ϕ,γ,λ,σ为参数。

在OpenCV中的getGaborKernel函数里需要传入的参数除了上述5个外,还需要传入卷积核的大小。


cv::Mat getGaborKernel(Size ksize, double sigma, double theta, double lambd, double gamma, double psi=CV_PI*0.5, int ktype=CV_64F );

Figure 3: The Gabor Filter in frequency with the orientation of 0°, 45°, 90°.

参数

This block implements one or multiple convolutions of an input image with a two-dimensional Gabor function:

To visualize a Gabor function select the option "Gabor function" under "Output image". The Gabor function for the specified values of the parameters "wavelength", "orientation", "phase offset", "aspect ratio", and "bandwidth" will be calculated and displayed as an intensity map image in the output window. (Light and dark gray colors correspond to positive and negative function values, respectively.) The image in the output widow has the same size as the input image: select, for instance, input image octagon.jpg to get an output image of size 100 by 100. If lists of values are specified under "orientation(s)" and "phase offset(s)", only the first values in these lists will be used.

Two-dimensional Gabor functions were proposed by Daugman [1] to model the spatial summation properties (of the receptive fields) of simple cells in the visual cortex. They are widely used in image processing, computer vision, neuroscience and psychophysics. The parametrisaton used in Eq.(1) follows references [2-7] where further details can be found.

Wavelength (λ)

This is the wavelength of the cosine factor of the Gabor filter kernel and herewith the preferred wavelength of this filter. Its value is specified in pixels. Valid values are real numbers equal to or greater than 2. The value λ=2 should not be used in combination with phase offset φ=-90 or φ=90 because in these cases the Gabor function is sampled in its zero crossings. In order to prevent the occurence of undesired effects at the image borders, the wavelength value should be smaller than one fifth of the input image size.

The images (of size 100 x 100) on the left show Gabor filter kernels with values of the wavelength parameter of 5, 10 and 15, from left to right, respectively. The values of the other parameters are as follows: orientation 0, phase offset 0, aspect ratio 0.5, and bandwidth 1.

Orientation(s) (θ)

This parameter specifies the orientation of the normal to the parallel stripes of a Gabor function. Its value is specified in degrees. Valid values are real numbers between 0 and 360.

The images (of size 100 x 100) on the left show Gabor filter kernels with values of the orientation parameter of 0, 45 and 90, from left to right, respectively. The values of the other parameters are as follows: wavelength 10, phase offset 0, aspect ratio 0.5, and bandwidth 1.

For one single convolution, enter one orientation value and set the value of the last parameter in the block "number of orientations" to 1. 
If "number of orientations" is set to an integer value N, N >= 1, then N convolutions will be computed. The orientations of the corresponding Gabor functions are equidistantly distributed between 0 and 360 degrees in increments of 360/N, starting from the value specified under "orientation(s)". An alternative way of computing multiple convolutions for different orientations is to specify under "orientation(s)" a list of values separated by commas (e.g. 0,45,110). In this case, the value of the parameter "number of orientations" is ignored.

Phase offset(s) (φ)

The phase offset φ in the argument of the cosine factor of the Gabor function is specified in degrees. Valid values are real numbers between -180 and 180. The values 0 and 180 correspond to center-symmetric 'center-on' and 'center-off' functions, respectively, while -90 and 90 correspond to anti-symmetric functions. All other cases correspond to asymmetric functions.

The images (of size 100 x 100) on the left show Gabor filter kernels with values of the phase offset parameter of 0, 180, -90 and 90 dgerees, from left to right, respectively. The values of the other parameters are as follows: wavelength 10, orientation 0, aspect ratio 0.5, and bandwidth 1.

If one single value is specified, one convolution per orientation will be computed. If a list of values is given (e.g. 0,90 which is default), multiple convolutions per orientation will be computed, one for each value in the phase offset list.

Aspect ratio (γ)

This parameter, called more precisely the spatial aspect ratio, specifies the ellipticity of the support of the Gabor function. For γ = 1, the support is circular. For γ < 1 the support is elongated in orientation of the parallel stripes of the function. Default value is γ = 0.5.

The images (of size 100 x 100) on the left show Gabor filter kernels with values of the aspect ratio parameter of 0.5 and 1, from left to right, respectively. The values of the other parameters are as follows: wavelength 10, orientation 0, phase offset 0, and bandwidth 1.

Bandwidth (b)

The half-response spatial frequency bandwidth b (in octaves) of a Gabor filter is related to the ratio σ / λ, where σ and λ are the standard deviation of the Gaussian factor of the Gabor function and the preferred wavelength, respectively, as follows:

The value of σ cannot be specified directly. It can only be changed through the bandwidth b. The bandwidth value must be specified as a real positive number. Default is 1, in which case σ and λ are connected as follows: σ = 0.56 λ. The smaller the bandwidth, the larger σ, the support of the Gabor function and the number of visible parallel excitatory and inhibitory stripe zones.

The images (of size 100 x 100) on the left show Gabor filter kernels with values of the bandwidth parameter of 0.5, 1, and 2, from left to right, respectively. The values of the other parameters are as follows: wavelength 10, orientation 0, phase offset 0, and aspect ratio 0.5.

Number of orientations

Default value is 1. If an integer value N, N >= 1, is specified then N convolutions will computed. The orientations of the corresponding Gabor functions are equidistantly distributed between 0 and 360 degrees, with increments of 360/N, starting from the value specified in "orientation(s)". For this option to work, one single value (without a comma present) must be specified for the parameter "orientation(s)".


Half-wave rectification (HWR)

Enable HWR

If this option is enabled, all values in the convolution results below a certain threshold value will be set to zero (HWR is disabled by default).

HWR threshold (%)

The threshold value can be specified as a percentage of the maximum value in a given convolution result. If this percentage is set to 0, all negative values in that convolution result will be changed to 0.


Superposition of phases

If a list of multiple values is entered under parameter "Phase offset(s)" of the "Gabor filtering" block, multiple convolutions will be computed for each orientation value specified, one convolution for each phase offset value in the list. The convolution results for the different phase offset values of a given orientation can be combined in one single output image for that orientation. This combination can be done in different ways, using the L2, L1 or L-infinity norms. If the L2 norm is used, the squared values of the convolution results for the concerned orientation will be added together pixel-wise and followed by a pixel-wise square root computation to produce the combined result. The L1 and the L-infinity norms correspond to the pixel-wise sum and maximum of the absolute values, respectively. Default is the L2 norm. This choice, together with the default (0,90) of the "Phase offset(s)" of the "Gabor filtering" block, implements the Gabor energy filter that is widely uses in image processing and computer vision. One can also choose not to apply superposition of phases ("None").


Surround inhibition

The Gabor filter can be augmented with surround inhibition which suppresses texture edges while leaving relativley unaffected the contours of objects and region boundaries. This biologically motivated mechanism introduced in [6,7] is particularly useful for contour-based object recognition. In that case, texture edges play the role of noise that obscures object contours and region boundaries and should preferably be eliminated. One can best observe the effect of surround inhibition on different types of oriented features, such as edges in texture vs. isolated edges and lines, by taking the default input image "synthetic1.png".

Select inhibition type

Default is "no surround inhibition".

If "isotropic surround inhibition" is selected, edges in the surroundings of a given edge have a suppression effect on that edge. The relative orientation of these edges has no influence on the suppression effect.

If "anisotropic surround inhibition" is selected, the suppression effect of edges surrounding a given edge depends on their relative orientation: edges parallel to the considered edge have stronger suppression effect than oblique edges, and orthogonal edges have no such effect.

Superposition for isotropic inhibition

If "isotropic inhibition" is selected, a superposition of the convolution results for all used orientations is computed and deployed for surround suppression. Different types of superposition can be used: L1, L2 and L-infinity norms (see the explanations of these terms under "Superposition of phases" in the "Gabor filtering" block).

Alpha (α)

This parameter controls the strength of surround suppression. Default is 1 but one may need larger values in order to completely suppress texture edges.

K1 and K2

The surround that has a suppression effect on an edge in a given point has annular form with inner radius controlled by the combination of values of the parameters K1 and K2. The contribution of points in the annular surround is defined by a weighting function which is a half-wave rectified difference of Gaussian functions with standard deviations of K1σ and K2σ where σ is the standard deviation of the Gaussian factor of the Gabor function(s) used. One can visualize the weighting function by selecting option "inhibition kernel" under parameter "Output image".

The inner radius of the annular surround increases with K1. The size of the annual surround which has substantial contribution to the suppression increases with K2.

Default values are K1 = 1 and K2 = 4.

Gabor filter for image processing and computer vision的更多相关文章

  1. Computer Vision: Algorithms and ApplicationsのImage processing

    实在是太喜欢Richard Szeliski的这本书了.每一章节(after chapter3)都详述了该研究方向比較新的成果.还有很多很多的reference,假设你感兴趣.全然能够看那些參考论文 ...

  2. Computer Vision Algorithm Implementations

    Participate in Reproducible Research General Image Processing OpenCV (C/C++ code, BSD lic) Image man ...

  3. Gabor filter与Gabor transform

    https://en.wikipedia.org/wiki/G%C3%A1bor Gabor filter:a linear filter used in image processing一种线性滤波 ...

  4. Image Processing and Computer Vision_Review:Local Invariant Feature Detectors: A Survey——2007.11

    翻译 局部不变特征探测器:一项调查 摘要 -在本次调查中,我们概述了不变兴趣点探测器,它们如何随着时间的推移而发展,它们如何工作,以及它们各自的优点和缺点.我们首先定义理想局部特征检测器的属性.接下来 ...

  5. paper 156:专家主页汇总-计算机视觉-computer vision

    持续更新ing~ all *.files come from the author:http://www.cnblogs.com/findumars/p/5009003.html 1 牛人Homepa ...

  6. Computer Vision: OpenCV, Feature Tracking, and Beyond--From <<Make Things See>> by Greg

    In the 1960s, the legendary Stanford artificial intelligence pioneer, John McCarthy, famously gave a ...

  7. Computer Vision的尴尬---by林达华

    Computer Vision的尴尬---by林达华 Computer Vision是AI的一个非常活跃的领域,每年大会小会不断,发表的文章数以千计(单是CVPR每年就录取300多,各种二流会议每年的 ...

  8. Computer Vision Applied to Super Resolution

    Capel, David, and Andrew Zisserman. "Computer vision applied to super resolution." Signal ...

  9. Computer Vision Resources

    Computer Vision Resources Softwares Topic Resources References Feature Extraction SIFT [1] [Demo pro ...

随机推荐

  1. 水一帖:快速计算ceil(a/b)的方式

    今天拍脑袋想出来的,不用ceil函数,不用浮点运算,不用取模,兼顾运行常数和代码量的向上取整除方法 在保证a,b>0时 ceil(a/b)=(a-1)/b+1; (完)

  2. 一次修复MySQL数据库的经历

    一次修复MySQL数据库的经历 实验室服务器的硬盘满了,结果导致一个线上服务的MySQL数据库的两个表坏了.具体症状是desc cdb_searchindex显示 ERROR 1017 (HY000) ...

  3. Python 爬虫-爬取京东手机页面的图片

    具体代码如下: __author__ = 'Fred Zhao' import requests from bs4 import BeautifulSoup import os from urllib ...

  4. Linux下使用Eclipse 远程调试

    1 开启端口 修改/apache-tomcat-7.0.40/bin/catalina.sh 在合适的位置(请自行判断,只要有JAVA_OPTS的设定前后即可)插入下面的设定:UI_DEBUG=&qu ...

  5. 利用DOM节点找对象和直接在标签属性中调函数传值this的书写区别

    同样的功能,不同的书写格式. 1.个人觉得比较繁琐的写法,但是比较常见,特别是在大项目的时候常用的就是这种方法: <div id="mouse" onmouseover=&q ...

  6. java中的反射机制和javaBean

    反射 反射:就是通过一个类加载进方法区时加载到栈内存中的Class字节码文件对这个类进行解剖 通过反射可以获取到一个类的构造方法,成员方法,成员变量 反射将一个类的各个部分映射成相应的类 反射获取构造 ...

  7. Git仓库操作命令

    创建仓库 git init 在当前目录执行,会生成.git目录文件,这个和SVN一致. 提交到仓库 git commit -m "first commit" -m:表示提交描述,必 ...

  8. grep 的一些常用用法

    打印匹配到的上下5行 grep -C 5 'root' /etc/passwd            上下5行 grep -A 5 'root' /etc/passwd            afte ...

  9. 买不到的数目 /// 结论公式 oj26316

    题目大意: 给定a b(这题题意不清 其实a b互质) 设变量x y(x>=0,y>=0),求 x*a+y*b=c 找到最大的不可能达到的c 如a=4 b=7 那么c=14 有这样一个定理 ...

  10. 2008年最佳Web设计/前端开发技巧、脚本及资源总结

    工具&Web应用 13个可能会让你说”Thank You”的必不可少的开源应用 14个免费工具让你了解为什么人们会放弃访问你的网站 40+CSS生成器 74个我们可能已经忘记的适合网页设计师的 ...