資源簡介
原創matlab的雙攝像頭控制GUI-camera.m
利用GUI設計的雙攝像頭控制。剛進論壇,新手。可以實現預覽、單攝像頭單獨采集、雙攝像頭同時采集功能。目前只是一個比較粗糙的設計,計劃加上定時拍照,指定圖像保存的路徑。由于沒有M值了,請大家在“定時拍照,指定圖像保存的路徑”方面給點幫助哈!謝謝了。
利用GUI設計的雙攝像頭控制。剛進論壇,新手。可以實現預覽、單攝像頭單獨采集、雙攝像頭同時采集功能。目前只是一個比較粗糙的設計,計劃加上定時拍照,指定圖像保存的路徑。由于沒有M值了,請大家在“定時拍照,指定圖像保存的路徑”方面給點幫助哈!謝謝了。
代碼片段和文件信息
function?varargout?=?camera(varargin)
%?CAMERA?M-file?for?camera.fig
%??????CAMERA?by?itself?creates?a?new?CAMERA?or?raises?the?existing
%??????singleton*.
%
%??????H?=?CAMERA?returns?the?handle?to?a?new?CAMERA?or?the?handle?to
%??????the?existing?singleton*.
%
%??????CAMERA(‘CALLBACK‘hobjecteventDatahandles...)?calls?the?local
%??????function?named?CALLBACK?in?CAMERA.M?with?the?given?input?arguments.
%
%??????CAMERA(‘Property‘‘Value‘...)?creates?a?new?CAMERA?or?raises?the
%??????existing?singleton*.??Starting?from?the?left?property?value?pairs?are
%??????applied?to?the?GUI?before?camera_OpeningFunction?gets?called.??An
%??????unrecognized?property?name?or?invalid?value?makes?property?application
%??????stop.??All?inputs?are?passed?to?camera_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?camera
%?Last?Modified?by?GUIDE?v2.5?07-Apr-2010?09:56:01
%?Begin?initialization?code?-?DO?NOT?EDIT
gui_Singleton?=?1;
gui_State?=?struct(‘gui_Name‘???????mfilename?...
???????????????????‘gui_Singleton‘??gui_Singleton?...
???????????????????‘gui_OpeningFcn‘?@camera_OpeningFcn?...
???????????????????‘gui_OutputFcn‘??@camera_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?camera?is?made?visible.
function?camera_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?camera?(see?VARARGIN)
%?Choose?default?command?line?output?for?camera
handles.output?=?hobject;
%?Update?handles?structure
guidata(hobject?handles);
%?UIWAIT?makes?camera?wait?for?user?response?(see?UIRESUME)
%?uiwait(handles.figure1);
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?camera_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.
%預覽攝像機1
function?pushbutton1_Callback(hobject?eventdata?handles)
%?hobject????handle?to?pushbutton1?(see?GCBO)
%?
評論
共有 條評論