资源简介
以上为Gabor滤波的Matlab代码,介绍了如何对图像进行去噪,增强图像效果,并得出二值化图像,运行是选中其中的Main项,运行即可得出示例滤波效果

代码片段和文件信息
function freqim = freqest(im orientim windsze minWaveLength maxWaveLength)%5515
debug = 0;
[rowscols] = size(im);
orientim = 2*orientim(:);
cosorient = mean(cos(orientim));
sinorient = mean(sin(orientim));
orient = atan2(sinorientcosorient)/2;
rotim = imrotate(imorient/pi*180+90‘nearest‘ ‘crop‘);%对图像进行旋转操作‘crop‘: 通过对旋转后的图像B进行裁剪, 保持旋转后输出图像B的尺寸和输入图像A的尺寸一样。
cropsze = fix(rows/sqrt(2)); offset = fix((rows-cropsze)/2);
rotim = rotim(offset:offset+cropsze offset:offset+cropsze);
proj = sum(rotim);
dilation = ordfilt2(proj windsze ones(1windsze));
maxpts = (dilation == proj) & (proj > mean(proj));
maxind = find(maxpts);
if length(maxind) < 2
freqim = zeros(size(im));
else
NoOfPeaks = length(maxind);
waveLength = (maxind(end)-maxind(1))/(NoOfPeaks-1);
if waveLength > minWaveLength & waveLength < maxWaveLength
freqim = 1/waveLength * ones(size(im));
else
freqim = zeros(size(im));
end
end
if debug
show(im1)
show(rotim2);
figure(3) plot(proj) hold on
meanproj = mean(proj)
if length(maxind) < 2
fprintf(‘No peaks found\n‘);
else
plot(maxinddilation(maxind)‘r*‘) hold off
waveLength = (maxind(end)-maxind(1))/(NoOfPeaks-1);
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2196150 2019-10-14 15:59 gabor滤波二值化\1.bmp
文件 83173 2019-10-14 15:59 gabor滤波二值化\finger.png
文件 1448 2019-10-14 15:59 gabor滤波二值化\freqest.m
文件 720 2019-10-14 15:59 gabor滤波二值化\main.m
文件 722 2019-10-15 10:40 gabor滤波二值化\main_test.m
文件 756 2019-10-14 15:59 gabor滤波二值化\normalise.m
文件 263 2019-10-14 15:59 gabor滤波二值化\Normalize.m
文件 93694 2019-10-25 15:36 gabor滤波二值化\out.bmp
文件 724 2019-10-14 15:59 gabor滤波二值化\plotridgeorient.m
文件 1840 2019-10-14 15:59 gabor滤波二值化\ridgefilter.m
文件 670 2019-10-14 15:59 gabor滤波二值化\ridgefreq.m
文件 1347 2019-10-14 15:59 gabor滤波二值化\ridgeorient.m
文件 1821 2019-10-14 15:59 gabor滤波二值化\ridgesegment.m
目录 0 2019-11-15 09:03 gabor滤波二值化
----------- --------- ---------- ----- ----
2383328 14
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论