function varargout = Gui_Main(varargin)
% GUI_MAIN M-file for Gui_Main.fig
% GUI_MAIN, by itself, creates a new GUI_MAIN or raises the existing
% singleton*.
%
% H = GUI_MAIN returns the handle to a new GUI_MAIN or the handle to
% the existing singleton*.
%
% GUI_MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI_MAIN.M with the given input arguments.
%
% GUI_MAIN('Property','Value',...) creates a new GUI_MAIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Gui_Main_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Gui_Main_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 Gui_Main
% Last Modified by GUIDE v2.5 29-Mar-2011 22:28:58
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Gui_Main_OpeningFcn, ...
'gui_OutputFcn', @Gui_Main_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 Gui_Main is made visible.
function Gui_Main_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 Gui_Main (see VARARGIN)
% Choose default command line output for Gui_Main
handles.output = hObject;
handles.Result = [];
handles.File = [];
% Update handles structure
guidata(hObject, handles);
clc; warning off all;
InitAxes(handles);
% UIWAIT makes Gui_Main wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Gui_Main_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 pushbuttonOpenFile.
function pushbuttonOpenFile_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonOpenFile (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...
'*.*','All Files' },'载入图像',...
fullfile(pwd, 'images'));
if isequal(filename, 0) || isequal(pathname, 0)
return;
end
I = imread(fullfile(pathname, filename));
Result = Process_Main(I);
handles.File = fullfile(pathname, filename);
handles.Result = Result;
guidata(hObject, handles);
InitAxes(handles)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
% --- Executes on button press in pushbuttonHisteq.
function pushbuttonHisteq_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonHisteq (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.hist); title('直方图均衡化图像');
end
% --- Executes on button press in pushbuttonMedfilt.
function pushbuttonMedfilt_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonMedfilt (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.Medfilt); title('中值滤波图像');
end
% --- Executes on button press in pushbuttonBw.
function pushbuttonBw_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonBw (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.Bw); title('二值图像');
end
% --- Executes on button press in pushbuttonEnance.
function pushbuttonEnance_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonEnance (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.Enance); title('增强图像');
end
% --- Executes on button press in pushbuttonBwfilter.
function pushbuttonBwfilter_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonBwfilter (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.Bw); title('二值图像');
axes(handles.axes3); imshow(handles.Result.BwFilter); title('二值图像滤波');
end
% --- Executes on button press in pushbuttonCrackRec.
function pushbuttonCrackRec_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonCrackRec (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.Bw); title('二值图像');
axes(handles.axes3); imshow(handles.Result.BwFilter); title('二值图像滤波');
axes(handles.axes4); imshow(handles.Result.CrackRec); title('裂缝识别');
end
% --- Executes on button press in pushbuttonCrackJudge.
function pushbuttonCrackJudge_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonCrackJudge (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.BwFilter); title('二值图像滤波');
axes(handles.axes3); imshow(handles.Result.CrackRec); title('裂缝识别');
axes(handles.axes4); imshow(handles.Result.CrackJudge); title('裂缝判断');
end
% --- Executes on button press in pushbuttonCrackLoc.
function pushbuttonCrackLoc_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonCrackLoc (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isempty(handles.Result)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');
axes(handles.axes2); imshow(handles.Result.CrackJudge); title('裂缝图像');
axes(handles.axes3); imshow(handles.Result.CrackJudge); title(handles.Result.str);
axes(handles.axes4); imshow(handles.Result.CrackJudge); title('裂缝标记图像')
没有合适的资源?快使用搜索试试~ 我知道了~
基于matlab的路面坑洼检测系统
共21个文件
m:15个
fig:2个
jpg:2个
0 下载量 20 浏览量
2024-04-29
16:45:41
上传
评论
收藏 294KB RAR 举报
温馨提示
1.项目代码功能经验证ok,确保稳定可靠运行。欢迎下载使用!在使用过程中,如有问题或建议,请及时私信沟通。 2.主要针对各个计算机相关专业,包括计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网等领域的在校学生、专业教师或企业员工使用。 3.项目具有丰富的拓展空间,不仅可作为入门进阶,也可直接作为毕设、课程设计、大作业、初期项目立项演示等用途。 4.当然也鼓励大家基于此进行二次开发。 5.期待你能在项目中找到乐趣和灵感,也欢迎你的分享和反馈! 使用matlab软件制作,有GUI登录界面和算法界面,可以检测路面坑洼,项目已经调试完成,可以正常使用。
资源推荐
资源详情
资源评论
收起资源包目录
人工智能的路面坑洼检测系统.rar (21个子文件)
人工智能的路面坑洼检测系统
Login.fig 12KB
disp_gray.m 216B
IterProcess.m 357B
bw_filter.m 329B
Identify_Object.m 560B
adjgamma.m 348B
Result
result.xls 18KB
Judge_Crack.m 1009B
Bridge_Crack.m 3KB
hist_con.m 421B
Login.m 9KB
Gui_Main.fig 73KB
Process_Main.m 1KB
images
test.png 145KB
ceshi1.jpg 45KB
Project.m 96B
Login.jpg 12KB
med_process.m 422B
Judge_Direction.m 551B
InitAxes.m 718B
Gui_Main.m 12KB
共 21 条
- 1
资源评论
光头勇
- 粉丝: 13
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功