当前位置:服务支持 >  软件文章 >  [转帖]matlab下gabor滤波算法提取图象纹理特征

[转帖]matlab下gabor滤波算法提取图象纹理特征

阅读数 6
点赞 0
article_banner
[转帖]matlab下gabor滤波算法,可以提取图象纹理特征


%%%%%%%VERSION 1


%The Gabor filter is basically a Gaussian (with variances sx and sy along x and y-axes respectively)
%modulated by a complex sinusoid (with centre frequencies U and V along x and y-axes respectively)
%described by the following equation
%%
% 1 -1 x ^ y ^
%%% G(x,y) = ---------- * exp ([----{(----) 2+(----) 2}+2*pi*i*(Ux+Vy)])
% 2*pi*sx*sy 2 sx sy


%% Describtion :


%% I : Input image
%% Sx & Sy : Variances along x and y-axes respectively
%% U & V : Centre frequencies along x and y-axes respectively


%% G : The output filter as described above
%% gabout : The output filtered image


%% Author : Ahmad poursaberi e-mail : a.poursaberi@ece.ut.ac.ir
%% Faulty of Engineering, Electrical&Computer Department,Tehran
%% University,Iran,June 2004


function [G,gabout] = gaborfilter(I,Sx,Sy,U,V);


if isa(I,'double')~=1
I = double(I);
end


for x = -fix(Sx):fix(Sx)
for y = -fix(Sy):fix(Sy)
G(fix(Sx)+x+1,fix(Sy)+y+1) = (1/(2*pi*Sx*Sy))*exp(-.5*((x/Sx)^2+(y/Sy)^2)+2*pi*i*(U*x+V*y));
end
end


Imgabout = conv2(I,double(imag(G)),'same');
Regabout = conv2(I,double(real(G)),'same');


gabout = uint8(sqrt(Imgabout.*Imgabout + Regabout.*Regabout));



免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删
相关文章
QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空