From: Nandish on 24 Jun 2010 04:06 Hello, I am acquiring continuous image using web cam with following code... vid = videoinput('winvideo',1); .... .... HFig = figure('Toolbar','figure','Menubar', 'figure',... 'NumberTitle','Off','Name','Thermal Profile'); H1 = uicontrol('String', 'Start Capture',... 'Callback', 'start(vid)',... 'Units','normalized', 'Position',[0 0 0.15 .07]); H2 = uicontrol('String', 'Stop Capture',... 'Callback', 'stop(vid)',... 'Units','normalized','Position',[0.15 0 .15 .07]); .... .... start(vid) while (isrunning(vid) == 1) trigger(vid) data = getdata(vid,1); imge = getsnapshot(vid); ... ... .. end stop(vid); The problem is whenever i pressed 'Start Capture' button after pressing 'Stop Button', it does not showing acquired image on GUI, while the web cam start capturing(as it turned on) what is the way to solve this problem? Second problem is that... In GUI what to do if we want to call two functions to execute when one pushbutton is pressed? Thank you.
|
Pages: 1 Prev: Saving figures is slow Next: Plotting 3D of a function with circular domain |