当前位置: 首页 > news >正文

裂缝识别系统 Matlab GUI设计

在这里插入图片描述
在这里插入图片描述

使用说明

裂缝识别系统 Matlab GUI设计 ,运行环境Matlab2023b及以上;

一种基于MATLAB图形用户界面(GUI)的裂缝自动识别系统,该系统利用数字图像处理技术实现裂缝图像的预处理,集成均衡化、噪声滤波、对比增强和形态学操作等算法,系统可高效识别裂缝,为工程结构检测提供便捷工具。

代码获取

  • 私信回复裂缝识别系统 Matlab GUI设计


% --- Executes on button press in pushbuttonProject.
function pushbuttonProject_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonProject (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); plot(1:size(handles.Result.Image, 1), handles.Result.Projectr);
    title('行投影');
    axes(handles.axes4); plot(1:size(handles.Result.Image, 2), handles.Result.Projectc);
    title('列投影');
end
% --- Executes on button press in pushbuttonClose.
function pushbuttonClose_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonClose (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
choice = questdlg('确定退出?', ...
    '退出', ...
    '是','否','否');
switch choice
    case '是'
        close;
    otherwise
        return;
end
% --- Executes on button press in pushbuttonSaveResult.
function pushbuttonSaveResult_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonSaveResult (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 pushbuttonBridge.
function pushbuttonBridge_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonBridge (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.CrackJudge); title('裂缝判断');
    axes(handles.axes4); imshow(handles.Result.CrackBridge); title('裂缝拼接');
end
% --- Executes on button press in pushbuttonSaveImage.
function pushbuttonSaveImage_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonSaveImage (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
[filename, pathname] = uiputfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...
    '*.*','All Files' },'Save Image',...
    fullfile(pwd, 'Result/result.png'));
if ~isequal(filename, 0)
    imwrite(handles.Result.BwEnd, fullfile(pathname, filename));
    msgbox('保存图像成功!', '信息提示框');
end
% --- Executes on button press in pushbuttonDiplay.
function pushbuttonDiplay_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonDiplay (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.File)
    F = [];
    F{1} = sprintf('文件名:%s', handles.File);
    F{2} = sprintf('阈值信息%.2f', handles.Result.BwTh);
    F{3} = sprintf('面积信息%.2f', handles.Result.BwArea);
    F{4} = sprintf('长度信息%.2f', handles.Result.BwLength);
    F{5} = sprintf('最大宽度信息%.2f', handles.Result.BwWidthMax);
    F{6} = sprintf('最小宽度信息%.2f', max(handles.Result.BwWidthMin,0.01));
    F{7} = sprintf('形状信息%s', handles.Result.str);
    listdlg('PromptString', '参数显示:',...
        'Name', '参数信息', ...
        'ListSize', [300, 150], ...
        'SelectionMode','single',...
        'ListString', F);
end

相关文章:

  • C# Unity 唐老狮 No.10 模拟面试题
  • 路由器与防火墙配置命令
  • QT5.15.2加载pdf为QGraphicsScene的背景
  • Matlab 汽车传动系统的振动特性分析
  • Elasticsearch 滚动索引(Rollover Index)详解
  • 算法基础篇(蓝桥杯常考点)
  • ZED X系列双目3D相机的耐用性与创新设计解析
  • SpringCloud 学习笔记2(Nacos)
  • AMBA-CHI协议详解(二十三)
  • vue2:el-table列中文字前面加icon图标的两种方式
  • AI自动获客系统源码
  • 【LangChain】理论及应用实战(5):Agent
  • Linux 入门:权限的认识和学习
  • 非常优秀的1个软件,再也不求人了!
  • DBA(数据库管理员)常用的 Linux 命令
  • Unity教程(二十二)技能系统 分身技能
  • 居家养老老年信息大数据分析基于SpringBootSSM框架
  • 实现回车键自动登录功能:Vue 2 和 Vue 3 的解决方案
  • 力扣No.673.最长递增子序列的个数
  • 【css酷炫效果】实现鱼群游动动态效果
  • 榆林建设局网站/色盲测试图片60张
  • 网站开发公司的选择/头条收录提交入口
  • 2022年好的网站在线客服/关键词推广技巧
  • 网站建设公司深圳/品牌网站建设公司
  • 网站建设项目背景/百度怎么发帖子
  • 大前端网站/济南seo顾问