一、简介

1 案例背景

2 理论基础


息,如下表所示:

二、部分源代码

function varargout = MainFrame(varargin)
% MAINFRAME MATLAB code for MainFrame.fig
%      MAINFRAME, by itself, creates a new MAINFRAME or raises the existing
%      singleton*.
%
%      H = MAINFRAME returns the handle to a new MAINFRAME or the handle to
%      the existing singleton*.
%
%      MAINFRAME('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAINFRAME.M with the given input arguments.
%
%      MAINFRAME('Property','Value',...) creates a new MAINFRAME or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before MainFrame_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to MainFrame_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 MainFrame% Last Modified by GUIDE v2.5 17-Dec-2013 21:03:28% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @MainFrame_OpeningFcn, ...'gui_OutputFcn',  @MainFrame_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
% End initialization code - DO NOT EDIT% --- Executes just before MainFrame is made visible.
function MainFrame_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 MainFrame (see VARARGIN)% Choose default command line output for MainFrame
handles.output = hObject;
clc;
handles.videoFilePath = 0;
handles.videoInfo = 0;
handles.videoImgList = 0;
handles.videoStop = 1;% Update handles structure
guidata(hObject, handles);% UIWAIT makes MainFrame wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = MainFrame_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 pushbuttonPlay.
function pushbuttonPlay_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonPlay (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 播放按钮
set(handles.pushbuttonPause, 'Enable', 'On');
set(handles.pushbuttonPause, 'tag', 'pushbuttonPause', 'String', '暂停');
set(handles.sliderVideoPlay, 'Max', handles.videoInfo.NumberOfFrames, 'Min', 0, 'Value', 1);
set(handles.editSlider, 'String', sprintf('%d/%d', 0, handles.videoInfo.NumberOfFrames));
% 循环载入视频帧图像并显示
for i = 1 : handles.videoInfo.NumberOfFrameswaitfor(handles.pushbuttonPause,'tag','pushbuttonPause');I = imread(fullfile(pwd, sprintf('video_images\\%03d.jpg', i)));    tryimshow(I, [], 'Parent', handles.axesVideo);% 设置进度条set(handles.sliderVideoPlay, 'Value', i);set(handles.editSlider, 'String', sprintf('%d/%d', i, handles.videoInfo.NumberOfFrames));catchreturn;enddrawnow;
end
% 控制暂停按钮
set(handles.pushbuttonPause, 'Enable', 'Off');% --- Executes on button press in pushbuttonOpenVideoFile.
function pushbuttonOpenVideoFile_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonOpenVideoFile (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 打开视频文件按钮
videoFilePath = OpenVideoFile();
if videoFilePath == 0return;
end
set(handles.editVideoFilePath, 'String', videoFilePath);
msgbox('打开视频文件成功!', '提示信息');
handles.videoFilePath = videoFilePath;
guidata(hObject, handles);% --- Executes on button press in pushbuttonImageList.
function pushbuttonImageList_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonImageList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 获取图像序列按钮
if handles.videoInfo == 0msgbox('请先获取视频信息', '提示信息');return;
end
Video2Images(handles.videoFilePath);
msgbox('获取图像序列成功!', '提示信息');% --- Executes on button press in pushbuttonStopCheck.
function pushbuttonStopCheck_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonStopCheck (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 视频分析
[s, sx, sy] =  MotionAnalysis();
handles.s = s;
handles.sx = sx;
handles.sy = sy;
% Update handles structure
guidata(hObject, handles);% --- Executes on button press in pushbuttonPause.
function pushbuttonPause_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonPause (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 暂停按钮
% 获取响应标记
str = get(handles.pushbuttonPause, 'tag');
if strcmp(str, 'pushbuttonPause') == 1set(handles.pushbuttonPause, 'tag', 'pushbuttonContinue', 'String', '继续');pause on;
elseset(handles.pushbuttonPause, 'tag', 'pushbuttonPause', 'String', '暂停');pause off;
end% --- Executes on button press in pushbuttonStop.
function pushbuttonStop_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonStop (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% 停止按钮
axes(handles.axesVideo); cla; axis on; box on;
set(gca, 'XTick', [], 'YTick', [], ...'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000]);
set(handles.editSlider, 'String', '0/0');
set(handles.sliderVideoPlay, 'Value', 0);
set(handles.pushbuttonPause, 'tag', 'pushbuttonContinue', 'String', '继续');
set(handles.pushbuttonPause, 'Enable', 'Off');
set(handles.pushbuttonPause, 'String', '暂停');function editFrameNum_Callback(hObject, eventdata, handles)
% hObject    handle to editFrameNum (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 editFrameNum as text
%        str2double(get(hObject,'String')) returns contents of editFrameNum as a double% --- Executes during object creation, after setting all properties.
function editFrameNum_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editFrameNum (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 ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
end

三、运行结果

四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 蔡利梅.MATLAB图像处理——理论、算法与实例分析[M].清华大学出版社,2020.
[2]杨丹,赵海滨,龙哲.MATLAB图像处理实例详解[M].清华大学出版社,2013.
[3]周品.MATLAB图像处理与图形用户界面设计[M].清华大学出版社,2013.
[4]刘成龙.精通MATLAB图像处理[M].清华大学出版社,2015.
[5]陈浩,方勇,朱大洲,王成,陈子龙.基于蚁群算法的玉米植株热红外图像边缘检测[J].农机化研究. 2015,37(06)

【图像处理】基于matlab GUI视频处理系统【含Matlab源码 756期】相关推荐

  1. 基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

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

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

  3. 基于JAVA校园面包超市系统计算机毕业设计源码+系统+数据库+lw文档+部署

    基于JAVA校园面包超市系统计算机毕业设计源码+系统+数据库+lw文档+部署 基于JAVA校园面包超市系统计算机毕业设计源码+系统+数据库+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  4. 基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署

    基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 本源码技术栈: 项目架构 ...

  5. 基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署

    基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署 基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语言:Java语言 ...

  6. 基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  7. 基于JAVA体育用品购物系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署

    基于JAVA体育用品购物系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 基于JAVA体育用品购物系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 本源码技术栈: 项目架构 ...

  8. 基于JAVA公立医院绩效考核系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA公立医院绩效考核系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA公立医院绩效考核系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 ...

  9. 基于JAVA网上图书销售系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署

    基于JAVA网上图书销售系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 基于JAVA网上图书销售系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 本源码技术栈: 项目架构 ...

  10. 基于java家庭理财记账系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署

    基于java家庭理财记账系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署 基于java家庭理财记账系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署 本源码技术栈: ...

最新文章

  1. esp8266 阿里云 arduino_ESP8266接入阿里云——基于官方SDK接入阿里云串口获取云下发数据...
  2. 红茶一杯话Binder(ServiceManager篇)
  3. 《神武4》手游玩家高峰论坛落幕 玩家集思广益 游戏氛围有望调整
  4. Java中集合(七)Collections 一个操作集合的工具类
  5. TestCenter中测试需求、测试用例、测试计划的评审方法
  6. ajax添加一行,ajax请求到数据会给上一个元素添加数据
  7. 【异或运算】 - 交换2个数
  8. 安卓手机浏览器排行_安卓手机双11性价比排行发布|拯救者手机发透明版|小米发大光圈手机镜头...
  9. mysql in 子查询优化_mysql in 子查询 容易优化
  10. php框架--php框架的连贯查询实现原理
  11. 爱奇艺深夜就“倒奶视频”致歉:《青你3》成团夜停止录制和直播......
  12. mac os 开启redis_【漫画】谈谈Redis持久化
  13. iptables常用配置规则
  14. Java基础,无许复杂语句,倒序输出整数,int i = 123;输出321
  15. 5-vue-template模板制作
  16. 信息集成项目管理工程师 学习资料_如何备考系统集成项目管理工程师?
  17. 常用的NoSQL数据库
  18. 3D 目标检测综述梳理图解
  19. python怎么把照片转成卡通_如何把照片变成手绘动漫化?
  20. 中石油大学22春季《大学英语(四)#》第一阶段在线作业

热门文章

  1. Netruon 理解(12):使用 Linux bridge 将 Linux network namespace 连接外网
  2. BigInteger类
  3. c#中一般处理程序中使用session
  4. SouthidcEditor编辑器如何支持上传png图片
  5. mock of python
  6. 在Netty中使用Apache common fileupload
  7. 日常英语:最近的药店在哪里
  8. 远程协同网络架构photon cloud
  9. Python学习笔记 之 变量进阶
  10. Latex WinEdt7.0查找替换功能