👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
主函数代码:
clear;
clf;
% Load the image
I=rgb2gray(imread('lena.jpg','jpg'));
load colormaps.mat
% Show the grayscale image
colormap(grayscale);
imshow(I);
% Filter the image
[G,GABOUT]=gaborfilter(I,0.05,0.025,0,0);
clear I;
R=real(GABOUT);
I=imag(GABOUT);
M=abs(GABOUT);
P=angle(GABOUT);
clear GABOUT;
% Show the filter's outputs
figure;
colormap(redgreen);
subplot(2,2,1);
k=127.5/max(max(abs(R)));
image(uint8(k*R+127.5));
subplot(2,2,2);
k=127.5/max(max(abs(I)));
image(uint8(k*I+127.5));
% Show the kernels
colormap(redgreen);
subplot(2,2,3);
image(uint8(127.5*real(G)+127.5));
subplot(2,2,4);
image(uint8(127.5*imag(G)+127.5));
% Show the magnitudes
figure;
colormap(grayscale);
k=255/max(max(M));
image(uint8(k*M));
% Show the phases
figure;
colormap(redgreen);
k=127.5/pi;
image(uint8(k*P+127.5));
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]刘超,林寿英,王彩霞,李新亮,张晓青,谢奕涛.基于Gabor滤波器和SVM结合的中华蜂图像识别方法[J].农业工程,2021,11(08):49-52.
[2]刘飞飞,孙合锐,王潇男,金达风.基于Gabor滤波的重建图像法检测皮革表面缺陷[J].传感器与微系统,2022,41(03):139-141+144.DOI:10.13873/J.1000-9787(2022)03-0139-03.
[3]朱刘盅,李竞择,吴磊等.基于Gabor滤波器的光纤缺陷检测方法[J].南京理工大学学报,2022,46(01):119-126.DOI:10.14177/j.cnki.32-1397n.2022.46.01.017.