标签:
2014-02-28 20:03
关于Gabor滤波器是如何提取出特征点,这个过程真是煎熬。看各种文章,结合百度、文章内部的分析才有一点点明白。
gama =0.2; sigma = 2; namuda = 6; x = -7:1:7; y = -35:1:35; sita = 0; [x,y]=meshgrid(x,y); x1 = x*cos(sita)+y*sin(sita); y1 = -x*sin(sita)+y*cos(sita); z = exp(-(x1.^2+gama^2*y1.^2)/(2*sigma^2)).*cos(2*pi*x1/namuda); z = z/sum(sum(z)); mesh(x,y,z);
gama =0.2; sigma = 2; namuda = 6; x = -7:1:7; y = -35:1:35; sita = 0; I= imread(‘F:\SceneTrialTrain\Train\surg.jpg‘); I = I(:,:,1); figure(1) imshow(I); [x,y]=meshgrid(x,y); x1 = x*cos(sita)+y*sin(sita); y1 = -x*sin(sita)+y*cos(sita); z = exp(-(x1.^2+gama^2*y1.^2)/(2*sigma^2)).*cos(2*pi*x1/namuda+3.14*2); z = z/sum(sum(z)); c = imfilter(I,z); d = c; m = c>180; n = c<=180; d(m) = 255; d(n) = 0; figure(2) imshow(d);
标签:
原文地址:http://www.cnblogs.com/jugg1024/p/4204969.html