裂缝识别基于matlab GUI BP神经网络路面裂缝识别系统含Matlab源码 1063期
Posted 紫极神光(Q1564658423)
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了裂缝识别基于matlab GUI BP神经网络路面裂缝识别系统含Matlab源码 1063期相关的知识,希望对你有一定的参考价值。
一、简介
高速公路路面病害养护和管理的重要部分就是路面裂缝的检测。近年来,路面裂缝自动检测技术已得到了广泛应用,而由于路面裂缝图像的复杂性,检测算法直接影响着检测结果的精确度。因此,本文将重点放在路面裂缝病害的检测上,为了提高检测的精度,分别从裂缝图像的去噪、图像的增强、图像的分割以及检测后路面裂缝图像的特征提取方面进行深入研究。 在路面裂缝图像中,由于裂缝信息与背景对比度偏低,难以将裂缝直接检测到。对于图像的预处理,首先对图像进行灰度校正,再对校正之后的图像滤波,本文提出了一种改进的中值滤波方法,对图像进行去噪,之后用基于模糊理论的图像增强原理对图像做进一步增强,有效提高了路面裂缝图像的对比度。 针对路面裂缝图像分割,本文分别用了阈值分割和基于形态学多尺度的思想,对于形状规则的裂缝采用的是阈值分割,对于裂缝形状不规则的图像,本文设计了一种多结构元素的抗噪型边缘检测算子,且依据不同形状的结构元素对裂缝边缘填充的几率不同,确定了自适应权重,使得算子检测到了各种类型的裂缝边缘,有效地提高了检测的精度。 对于经过分割后的路面裂缝图像中存在噪声和裂缝断裂的问题,本文对于断裂较窄的图像用形态学中的闭运算和开运算去处理,对于断裂较宽的图像,提出了一种基于生长的断裂裂缝块的连接方法。提高了连接的效率和准确率,使整个检测结果清晰完整。最终,从识别结果图中提取裂缝信息。根据得到的识别结果图,设定一系列判定条件,提取出裂缝的连通域,对裂缝的类型进行判断,最后计算出网状裂缝的面积及线性裂缝的长宽信息。
二、源代码
function varargout = firstPage(varargin)
% FIRSTPAGE MATLAB code for firstPage.fig
% FIRSTPAGE, by itself, creates a new FIRSTPAGE or raises the existing
% singleton*.
%
% H = FIRSTPAGE returns the handle to a new FIRSTPAGE or the handle to
% the existing singleton*.
%
% FIRSTPAGE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in FIRSTPAGE.M with the given input arguments.
%
% FIRSTPAGE('Property','Value',...) creates a new FIRSTPAGE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before firstPage_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to firstPage_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 firstPage
% Last Modified by GUIDE v2.5 12-Apr-2021 10:23:22
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @firstPage_OpeningFcn, ...
'gui_OutputFcn', @firstPage_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 firstPage is made visible.
function firstPage_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 firstPage (see VARARGIN)
% Choose default command line output for firstPage
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% set(gcf,'menu','figure');
set(gcf,'numbertitle','off','name','基于BP神经网络的路面裂缝检测与处理建议软件');
% UIWAIT makes firstPage wait for user response (see UIRESUME)
% uiwait(handles.figure1);
bg_P=axes('units','normalized','position',[0 0 1 1]);
uistack(bg_P,'bottom');
II=imread('background\\8.jpg');
image(II);
hold on
% w=text(177,68,'基于BP网络的路面裂缝处理系统','fontsize',25,'color',[1.0 1.0 1.0]);
w=text(65,98,'基于BP神经网络的路面裂缝检测与处理建议软件','fontsize',25,'color',[0.0 0.0 0.0]);
w1=text(52,150,'Pavement Crack Detection And Processing Suggest Software ','fontsize',20,'color',[0.0 0.0 0.0]);
w2=text(250,200,'Based On BP Neural Network ','fontsize',20,'color',[0.0 0.0 0.0]);
w3=text(385,400,'大学','fontsize',15,'color',[0.0 0.0 0.0]);
w4=text(340,420,'** University ','fontsize',13,'color',[0.0 0.0 0.0]);
w5=text(380,470,'1st,April,2021','fontsize',11,'color',[0.0 0.0 0.0]);
colormap gray;
set(bg_P,'handlevisibility','off','visible','off');
% set(handles.pushbutton1,'visible','off');
% --- Outputs from this function are returned to the command line.
function varargout = firstPage_OutputFcn(~, 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 model_Callback(hObject, eventdata, handles)
% hObject handle to model (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Help_Callback(hObject, eventdata, handles)
% hObject handle to Help (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Exit_Callback(hObject, eventdata, handles)
% hObject handle to Exit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close gcf;
% --------------------------------------------------------------------
function fast_Callback(hObject, eventdata, handles) %%%%%%%%%%%%%%%%%%%%%%%%%%%模式选择---》快速模式
% --------------------------------------------------------------------
function Retrain_Callback(hObject, eventdata, handles) %%%%%%%%%%%%%%%%%%%%%模式选择---》重新训练
ANNcheck;
load data\\acy_check;
load data\\acy_reg;
t=['准确率为' acy_check];
q=questdlg(t,'是否重新训练','是','否','否');
if q=='是'
Retrain_Callback();
else
setappdata(0,'acy_check',acy_check);
setappdata(0,'acy_reg',acy_reg);
close(gcf);
secondPage;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%作为《重新训练or快速模式》标志
Hit=0;
setappdata(0,'Hit',Hit); %%%%%%%重新训练模式,则 Hit=0
% --------------------------------------------------------------------
function ask_help_Callback(hObject, eventdata, handles)
% hObject handle to ask_help (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open ('Help.docx');
% --------------------------------------------------------------------
function Wenjian_Callback(hObject, eventdata, handles)
% hObject handle to Wenjian (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function file_in_Callback(hObject, eventdata, handles)
% hObject handle to file_in (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open txt\\程序文件介绍.txt
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Exit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function DingYi_Callback(hObject, eventdata, handles)
% hObject handle to DingYi (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open txt\\裂缝方向定义.txt
% --------------------------------------------------------------------
function Net_Callback(hObject, eventdata, handles)
% hObject handle to Net (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function CheckNet_Callback(hObject, eventdata, handles) %%%%%%%%%%%%%%%%%关于网路-》检测网络
% hObject handle to CheckNet (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open txt\\检测网络.txt;
% --------------------------------------------------------------------
function RecNet_Callback(hObject, eventdata, handles) %%%%%%%%%%%%%%%%%关于网路-》识别网络
% hObject handle to RecNet (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
open txt\\识别网络.txt;
% --------------------------------------------------------------------
function retrain_c_Callback(hObject, eventdata, handles)
% hObject handle to retrain_c (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function retrain_r_Callback(hObject, eventdata, handles)
% hObject handle to retrain_r (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% ------------------------------------------裂缝识别基于matlab GUI路面裂缝识别含Matlab源码 009期
裂缝识别基于matlab GUI路面裂缝识别(带面板)含Matlab源码 1648期
裂缝识别基于matlab GUI无人机裂缝图像处理系统(带面板)含Matlab源码 1727期