function varargout = shiping(varargin)
% SHIPING MATLAB code for shiping.fig
% SHIPING, by itself, creates a new SHIPING or raises the existing
% singleton*.
%
% H = SHIPING returns the handle to a new SHIPING or the handle to
% the existing singleton*.
%
% SHIPING('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SHIPING.M with the given input arguments.
%
% SHIPING('Property','Value',...) creates a new SHIPING or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before shiping_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to shiping_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 shiping
% Last Modified by GUIDE v2.5 14-Jul-2022 17:02:38
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @shiping_OpeningFcn, ...
'gui_OutputFcn', @shiping_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 shiping is made visible.
function shiping_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 shiping (see VARARGIN)
% Choose default command line output for shiping
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes shiping wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = shiping_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 pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
global shiping;
global filename;
global mov;
global numFrames;
global framerate;
axes(handles.axes5)%声明图片一显示
[filename,pathname]=uigetfile({ ...
'*.*','All Files(*.*)';},...
'选择文件');%调用打开图片对话框
%
if isequal([filename,pathname],[0,0])%判断文件名是否为空
return
else
videoname = fullfile(pathname,filename);%获取选取图片的完整路径
% mov=imread(videoname);%读取图片
readerobj = VideoReader(videoname, 'tag', 'myreader1');
filename = videoname;
% Read in all video frames.
vidFrames = read(readerobj);
% Get the number of frames.
numFrames = get(readerobj, 'NumberOfFrames');
% Create a MATLAB movie struct from the video frames.
mov = [];
for k = 1 : numFrames
mov(k).cdata = vidFrames(:,:,:,k);
mov(k).colormap = [];
end
set(handles.text2,'String',readerobj.Name);
set(handles.text4,'String',readerobj.NumberOfFrames);
set(handles.text6,'String',readerobj.Width);
set(handles.text8,'String',readerobj.Height);
% Playback movie once at the video's frame rate
framerate = readerobj.FrameRate;
movie(handles.axes5, mov, 1, readerobj.FrameRate);
%handle.axes1=b;
end
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
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 ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function 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 ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (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 pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
global filename;
start = str2num(get(handles.edit1,'String'));
genzong(filename,start);
% hObject handle to pushbutton4 (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 pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
global img1;
axes(handles.axes2)%声明图片一显示
[filename,pathname]=uigetfile({ ...
'*.*','All Files(*.*)';},...
'选择文件');%调用打开图片对话框
%
if isequal([filename,pathname],[0,0])%判断文件名是否为空
return
else
videoname = fullfile(pathname,filename);%获取选取图片的完整路径
img1=imread(videoname);%读取图片
imshow(img1);
title('图像1');
end
% hObject handle to pushbutton5 (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 pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
global img2;
axes(handles.axes3)%声明图片一显示
[filename,pathname]=uigetfile({ ...
'*.*','All Files(*.*)';},...
'选择文件');%调用打开图片对话框
%
if isequal([filename,pathname],[0,0])%判断文件名是否为空
return
else
videoname = fullfile(pathname,filename);%获取选取图片的完整路径
img2=imread(videoname);%读取图片
imshow(img2);
title('图像2');
end
% hObject handle to pushbu
火焰识别 火灾检测 matlab的图形处理 得到火焰的GUI界面
版权申诉
127 浏览量
2022-07-14
17:07:02
上传
评论
收藏 9.2MB RAR 举报
matlab_python22
- 粉丝: 146
- 资源: 128
最新资源
- 而且往往吾问无为谓吾问无为谓吾问无为谓呜呜呜呜呜呜呜呜呜
- 无人机自主解锁、起飞、offboard、点控的ros功能包
- base.apk
- PMV20XN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于Vue的medical-vue医疗挂号系统设计源码
- Python解析网页.xmind
- PMV185XN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- PMV170UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于Java的长理教务管理系统设计源码
- PMV16UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈