一、图像分割简介

理论知识参考:【基础教程】基于matlab图像处理图像分割【含Matlab源码 191期】

二、部分源代码

unction varargout = interface(varargin)
% INTERFACE M-file for interface.fig
%      INTERFACE, by itself, creates a new INTERFACE or raises the existing
%      singleton*.
%
%      H = INTERFACE returns the handle to a new INTERFACE or the handle to
%      the existing singleton*.
%
%      INTERFACE('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in INTERFACE.M with the given input arguments.
%
%      INTERFACE('Property','Value',...) creates a new INTERFACE or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before interface_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to interface_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% Copyright 2002-2003 The MathWorks, Inc.% Edit the above text to modify the response to help interface% Last Modified by GUIDE v2.5 13-Mar-2006 11:25:28% Begin initialization code - DO NOT EDIT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%this define the global variables
global OriginImg;       %this is the image of original
global SegmentImg ;     %this is the image of segmented
global threshold ;      %this is the fixed threshold for segment image
global nnet ;           %this is the neural network
global P ;              %this is the sample of original
global T ;              %this is the sample of target
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @interface_OpeningFcn, ...'gui_OutputFcn',  @interface_OutputFcn, ...'gui_LayoutFcn',  [] , ...'gui_Callback',   []);
if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
elsegui_mainfcn(gui_State, varargin{:});
end%initialize variables
threshold = 80 ;% End initialization code - DO NOT EDIT% --- Executes just before interface is made visible.
function interface_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 interface (see VARARGIN)% Choose default command line output for interface
handles.output = hObject;% Update handles structure
guidata(hObject, handles);global OriginImg;
global SegmentImg ;OriginImg = imread('image\a.bmp');
SegmentImg = OriginImg ;
set(gcf,'CurrentAxes',handles.h1);
imshow(OriginImg);
set(gcf,'CurrentAxes',handles.h2);
imshow(SegmentImg);% UIWAIT makes interface wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = interface_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;function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit3_Callback(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit3 as text
%        str2double(get(hObject,'String')) returns contents of edit3 as a double% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit4_Callback(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit4 as text
%        str2double(get(hObject,'String')) returns contents of edit4 as a double% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

三、运行结果



四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 蔡利梅.MATLAB图像处理——理论、算法与实例分析[M].清华大学出版社,2020.
[2]杨丹,赵海滨,龙哲.MATLAB图像处理实例详解[M].清华大学出版社,2013.
[3]周品.MATLAB图像处理与图形用户界面设计[M].清华大学出版社,2013.
[4]刘成龙.精通MATLAB图像处理[M].清华大学出版社,2015.
[5]赵勇,方宗德,庞辉,王侃伟.基于量子粒子群优化算法的最小交叉熵多阈值图像分割[J].计算机应用研究. 2008,(04)

【图像分割】基于matalb GUI遗传神经网络图像分割【含Matlab源码 659期】相关推荐

  1. 【光学】基于matlab GUI杨氏双缝干涉【含Matlab源码 001期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI杨氏双缝干涉[含Matlab源码 001期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...

  2. 【条形码识别】基于matlab GUI二维条形码识别【含Matlab源码 607期】

    ⛄一.二维条形码识别简介 采用数字图像处理技术对二维条码进行识别, 是二维条形码识别中较常用的方法, 它在处理污损的条形码方面有光电识别方法无法比拟的优势.另外图像式识别方法对识别角度的要求没有光电识 ...

  3. 【人脸识别】基于matlab GUI人数统计【含Matlab源码 2121期】

    ⛄一.人数统计简介(附课程作业报告) 1 课题背景 本课题为基于matlab的人数统计系统.近年来,很多行业对人流信息有极大的需求,如汽车公交站,地铁站台,商场出入口等.通过人数统计系统可以方便.可靠 ...

  4. 【心电信号】基于matlab GUI心电信号预处理【含Matlab源码 938期】

    ⛄一.心电信号预处理方法简介 理论知识参考文献:心电信号预处理方法研究 ⛄二.部分源代码 function varargout = kaishi(varargin) gui_Singleton = 1 ...

  5. matlab svm 语音识别,【情感识别】基于matlab支持向量机(SVM)的语音情感识别【含Matlab源码 543期】...

    一.简介 支持向量机(Support Vector Machine)是Cortes和Vapnik于1995年首先提出的,它在解决小样本.非线性及高维模式识别中表现出许多特有的优势,并能够推广应用到函数 ...

  6. 【图像分割】基于matlab HSV彩色空间图像分割【含Matlab源码 1474期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[图像分割]基于matlab HSV彩色空间图像分割[含Matlab源码 1474期] (https://download.csdn.ne ...

  7. 【图像分割】基于matlab萤火虫算法图像分割【含Matlab源码 2136期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[图像分割]基于matlab萤火虫算法图像分割[含Matlab源码 2136期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...

  8. 【电力预测】基于matlab GUI灰色模型电力负荷预测【含Matlab源码 769期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源: [电力负荷预测]基于matlab GUI灰色模型电力负荷预测[含Matlab源码 769期] 获取代码方式2: 通过订阅紫极神光博客付费专 ...

  9. 【数字信号】基于matlab GUI多音双频(DTMF)拨号音频解码仿真系统【含Matlab源码 1084期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数字信号]基于matlab GUI多音双频(DTMF)拨号音频解码仿真系统[含Matlab源码 1084期] 点击上面蓝色字体,直接付费 ...

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

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

最新文章

  1. 使用AWSTATS自动分析Nginx日志
  2. python中打开文件提示编码当时错误_Python:文件编码错误
  3. MQTT(1)---物联网核心之MQTT(一)
  4. js获取地址栏url以及获取url参数
  5. 【转】Tcl/Tk 漫谈
  6. 关于在nodejs上使用es6特性
  7. paip.目录文件列表排序算法
  8. 搭建一个网站的价格以及步骤全面解读
  9. 周易六爻起卦排盘微信小程序
  10. 中科矿业深度解析:BZZ未来价格会怎么走?
  11. 计算机课程word教学,Word教学方法及使用技巧
  12. 牛客网 8.2 网易2017校招 Java 第一题 下厨房
  13. 我的世界服务器无限刷东西指令,我的世界无限刷物品命令方块指令 | 手游网游页游攻略大全...
  14. MDClub一个漂亮轻量的开源论坛系统
  15. 我绘制文章插图的三个神级工具
  16. pspice仿真库DC电源设置请教
  17. 运营商拆除2G基站,老家的老人机还有信号吗?
  18. EXCEL:摒弃千篇一律,修改工作表中网络线的颜色
  19. oracle一些基本函数
  20. Mastering the game of Go with deep neural networks and tree search翻译

热门文章

  1. ZOJ 1111 Poker Hands
  2. Durable NAND flash memory management
  3. 【转】C语言浮点数运算
  4. 20200620每日一句
  5. HTC扣动板机出现射线。获得射线与VR中物体的交点并用linerender表示出来
  6. 281210每日一句
  7. 181031每日一句
  8. Atitit web httphandler的实现 java python node.js c# net php 目录 1.1. Java 过滤器 servelet 1 1.2. Python的
  9. atitit 知识压缩的总结 学习方法总结v2 t55.docx 目录 1.1. 压缩目的 1 1.2. 压缩分类 无损压缩 有损压缩 1 2. 功能指标 2 2.1. 压缩比:有损压缩一般1
  10. Atitit 图像处理 opencv使用蒙版mask抠图 切割 attilax总结