matlab实现gabor filter (1)
来源:互联网 发布:普通话翻译四川话软件 编辑:程序博客网 时间:2024/05/24 06:54
在 matlab中进行计算gabor filter,自己一步步的构建滤波器矩阵:
先构建gabor滤波器,然后和需要进行滤波的图像进行卷积
代码中的size用来确定gabor filter卷积模板窗口大小。但是这里的size的卷积模板有点偏小,一般都是乘上个系数,或者4或者8.
% GABORFILTER Bi-dimensional Gabor filter with DC component compensation.% [G,GABOUT]=GABORFILTER(I,S,F,W,P) filters the input image I with the 2D% Gabor filter G described by the parameters S, F, W and P to create the % output filtered image GABOUT.% This version of the 2D Gabor filter is basically a bi-dimensional % Gaussian function centered at origin (0,0) with variance S modulated by% a complex sinusoid with polar frequency (F,W) and phase P described by % the following equation:%% G(x,y,S,F,W,P)=k*Gaussian(x,y,S)*(Sinusoid(x,y,F,W,P)-DC(F,S,P)),% where: % Gaussian(x,y,S)=exp(-pi*S^2*(x^2+y^2))% Sinusoid(x,y,F,W,P)=exp(j*(2*pi*F*(x*cos(W)+y*sin(W))+P)))% DC(F,S,P)=exp(-pi*(F/S)^2+j*P)%% PS: The term DC(F,S,P) compensates the inherent DC component produced % by the Gaussian envelop as shown by Movellan in [1].%% Tips:% 1) To get the real part and the imaginary part of the complex % filter output use real(gabout) and imag(gabout), respectively;% % 2) To get the magnitude and the phase of the complex filter output % use abs(gabout) and angle(gabout), respectively.%% References:% [1] Movellan, J. R. - Tutorial on Gabor Filters. Tech. rep., 2002.function [G,GABOUT]=gabor_a(I,S,F,W,P)if isa(I,'double')~=1 I=double(I);endsize=fix(1.5/S); % exp(-1.5^2*pi) < 0.1%%k=2*pi*S^2;%F=S^2/sqrt(2*pi);k=1;for x=-size:size for y=-size:size G(size+x+1,size+y+1)=k*exp(-pi*S^2*(x*x+y*y))*... (exp(j*(2*pi*F*(x*cos(W)+y*sin(W))+P))-exp(-pi*(F/S)^2+j*P)); endendGABOUT=conv2(I,double(G),'same');
- matlab实现gabor filter (1)
- matlab实现gabor filter (2)
- matlab实现gabor filter (3)
- matlab实现gabor filter (4)
- matlab实现gabor filter (5)
- matlab实现gabor filter (6)
- matlab实现gabor filter (7)
- matlab实现gabor filter (8) 效果很好
- matlab实现gabor filter (9) 效果很好
- matlab实现gabor filter (10) 效果很好
- matlab实现gabor filter 多种方式汇总
- matlab中实现Gabor滤波器
- 2D-Gabor Matlab实现
- matlab中实现Gabor滤波器
- matlab中实现Gabor滤波器
- Gabor filter
- Gabor Filter
- Gabor filter
- 精确算出n的阶乘
- LINUX中a3c2440总线频率、时钟的设置
- NSURLCache 深入研究
- Oracle EBS与第三方应用进行集成(李鸣(aicken)原创 )
- SQL2008无法连接到.\SQLEXPRESS,用户'sa'登录失败(错误18456)图文解决方法
- matlab实现gabor filter (1)
- forms 、elements这是关于form的一个例子
- zoj1076
- java 算法--排序
- 通过一个网页获取ip地址城市名称
- 应用程序无法正常启动0xc0150002 解决方案
- 外链图片也有风险吗
- autoit3 ie.au3 函数之——_FileWriteLog日志
- QT4 中文乱码