⛄一、Gabor滤波布匹瑕疵检测简介

1 Gabor滤波器


2 Gabor函数结合代码分析:

⛄二、部分源代码

function varargout = bupi(varargin)
% BUPI MATLAB code for bupi.fig
% BUPI, by itself, creates a new BUPI or raises the existing
% singleton*.
%
% H = BUPI returns the handle to a new BUPI or the handle to
% the existing singleton*.
%
% BUPI(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in BUPI.M with the given input arguments.
%
% BUPI(‘Property’,‘Value’,…) creates a new BUPI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before bupi_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to bupi_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose “GUI allows only one
% instance to run (singleton)”.
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help bupi

% Last Modified by GUIDE v2.5 28-May-2015 22:11:59

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @bupi_OpeningFcn, …
‘gui_OutputFcn’, @bupi_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% — Executes just before bupi is made visible.
function bupi_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to bupi (see VARARGIN)
axes(handles.axes1);
imshow([255]);
axes(handles.axes2);
imshow([255]);
axes(handles.axes3);
imshow([255]);
axes(handles.axes4);
imshow([255]);
axes(handles.axes5);
imshow([255]);
axes(handles.axes6);
imshow([255]);
% Choose default command line output for bupi
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes bupi wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.
function varargout = bupi_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% — Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
global tu
axes(handles.axes1)
[filename,pathname]=uigetfile({ …
.’,‘All Files(.)’;},…
‘选择文件’);
%
if isequal([filename,pathname],[0,0])
return
else
%读取图片
pic = fullfile(pathname,filename);
b = imread(pic);
imshow(b);%上面是打开图片的步骤,这一句是显示图片
tu=b;

title('原始图像');
%handle.axes1=b;

end
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% — Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
global tu;
tu2 = gabor2(tu,0);
axes(handles.axes2);
imshow(tu2);
title(‘0度滤波结果’);

tu2 = gabor2(tu,pi/4);
axes(handles.axes3);
imshow(tu2);
title(‘pi/4度滤波结果’);

tu2 = gabor2(tu,pi/2);
axes(handles.axes4);
imshow(tu2);
title(‘pi/2度滤波结果’);

tu2 = gabor2(tu,pi/43);
axes(handles.axes5);
imshow(tu2);
title('pi/4
3度滤波结果’);
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% — Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
global tu;
P = 5;
T1 =8;
T2 = 100;
I = tu;
I0=I;
%预处理
I=double(I0); %数据类型的转换
[M,N]=size(I);%得到待检测图像的大小
J=junzhicaiyang(I,M,N,P); %调用均值下采样函数
J=uint8(J);
%双线性插值,恢复原来的图像大小
I1=imresize(J,P,‘bilinear’); %双线性插值,恢复原来图像的大小。
%进行方差下采样,用于增强图像疵点信息
I1=double(I1);
J1=fangchacaiyang(I1,M,N,P); %调用方差下采样函数
J1=uint8(J1);
%双线性插值,恢复原来图像的大小。
I=imresize(J1,P,‘bilinear’);
%进行二值化及其后处理
T=Otsu(I);
%解决了利用大津法不能分辨是否含有疵点的缺陷的缺点,统计发现无疵点图像otsu得到阈值均小于8
if T<=T1
T=T1+1;
end

⛄三、运行结果


⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]薛婷婷,刘秀平,张凯兵,王珍,闫亚娣,闫焕营.基于学习的Gabor滤波器多样式布匹瑕疵检测[J].西安工程大学学报. 2017,31(06)

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

【瑕疵检测】基于matlab GUI Gabor滤波布匹瑕疵检测【含Matlab源码 407期】相关推荐

  1. 【图像处理】基于matlab GUI多功能图像处理系统【含Matlab源码 1876期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[图像处理]基于matlab GUI多功能图像处理系统[含Matlab源码 1876期] 点击上面蓝色字体,直接付费下载,即可. 获取代码 ...

  2. 【机械仿真】基于matlab GUI曲柄摇杆机构运动仿真【含Matlab源码 1608期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[机械仿真]基于matlab GUI曲柄摇杆机构运动仿真[含Matlab源码 1608期] 点击上面蓝色字体,直接付费下载,即可. 获取代码 ...

  3. 【光学】基于matlab GUI光栅条纹投影生成【含Matlab源码 2118期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI光栅条纹投影生成[含Matlab源码 2118期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...

  4. 【机械仿真】基于matlab GUI直齿圆柱齿轮应力计算【含Matlab源码 2077期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[机械仿真]基于matlab GUI直齿圆柱齿轮应力计算[含Matlab源码 2077期] 点击上面蓝色字体,直接付费下载,即可. 获取代 ...

  5. 【天体学】基于matlab GUI太阳天顶角计算【含Matlab源码 2229期】

    一.⛄获取代码方式 获取代码方式1: 完整代码已上传我的资源:[天体学]基于matlab GUI太阳天顶角计算[含Matlab源码 2229期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...

  6. 【语音去噪】基于matlab GUI IIR滤波器语音去噪【含Matlab源码 1864期】

    一.语音处理简介 语言是人们获得各类有效信息的主要途径, 而语音是语言的表现形式.语音在一定程度上可影响人们的生活, 因此, 语音信号的研究对科学领域和人们日常生活具有一定的研究价值和意义.噪声广泛存 ...

  7. 【身份证识别】基于matlab GUI BP神经网络身份证识别【含Matlab源码 2239期】

    ⛄一.身份证号码识别简介 1 引言 当今是一个信息高度发达的时代,对于每个公民而言身份证那一连串的数字体现了个人信息的唯一性,出于保障公民合法权益和社会治安的考虑,越来越多的行业都开始建立自己的安全保 ...

  8. 【数学建模】基于matlab GUI平行停车模拟仿真【含Matlab源码 1877期】

    一.平行停车模拟仿真简介 近年来, 随着我国经济的快速发展, 机动车保有量也迅速增长.截至2012年底, 全国机动车保有量已达2.4亿辆, 城市"停车难"的问题日趋严重.统计结果表 ...

  9. 【病虫害识别】基于matlab GUI SVM病虫害识别系统【含Matlab源码 2429期】

    ⛄一.基于机器视觉的农作物病害识别技术 1 叶片图像采集 进行农作物病害自动检测与识别首先要对病害叶片的图像进行采集.自动识别的前提是获得数字图像, 数字图像质量的好坏决定着之后叶片病害的识别特征能否 ...

最新文章

  1. vue写一个通用的toast弹窗 toast 弹窗 提示
  2. javascript-arguments不确定参数使用
  3. 简单团队-爬取豆瓣电影TOP250-需求分析
  4. IDEA 2017 安装后 关联SVN
  5. 英伟达新核弹GPU:4nm制程800亿晶体管,20张即可承载全球互联网流量,全新Hopper架构太炸了...
  6. OAM K8s 标准实现 Crossplane 项目进入 CNCF Sandbox
  7. idea插件手动安装
  8. ec200s 封装_什么是无闪退免签封装?免签封装如何实现?
  9. 多径衰落信道下基带模型的多用户BPSK直接序列扩频系统MATLAB仿真(m序列、Gold序列和正交Gold序列)
  10. STL 源码剖析 空间配置器
  11. Fiddler在PC/台式对Android进行抓包
  12. Bootstrap 3 加半星 Star rating with half-stars
  13. 2.9 while循环
  14. 大规模中文自然语言处理语料(百科,问答、新闻,翻译)
  15. C++之默认参数顺序(从右到左)和调用顺序(从左到右)
  16. jQuery简单好用的JavaScript代码库略解使用
  17. 卡巴斯基安全浏览器_知名安全软件耍流氓!擅自监控用户,双十一绝不应该成为流氓软件的狂欢!...
  18. 微信小程序 图片上传+php后台源码
  19. I didn't write blog yesterday night for some ineffable reasons
  20. 路由器怎么设置WiFi短信认证?

热门文章

  1. vue同意本站协议的制作
  2. 他的一只鸟,卖了6000万 ——明清大家八大山人藏品发售
  3. Springboot入门小项目(CURD)
  4. 使用WPS把PPT转成视频
  5. 论文阅读 | Asymmetric Bilateral Motion Estimation for Video Frame Interpolation
  6. 第二银河找不到更新服务器,第二银河可以挂机吗?挂机设置步骤一览
  7. 移动端开发四种适配方案详解
  8. FCPX插件:视频降噪插件ProDenoise for Mac破解激活方法
  9. SeaD: End-to-end Text-to-SQL Generation with Schema-aware Denoising 论文解读
  10. Python 读取txt文本文件