I'm trying to use a toggle button to start and stop video acquisition but i get the following error. Could any1 help???
Mostra commenti meno recenti
Trying to use a simple toggle button to start and stop my video processing i get an error.
my code under that of the toggle button being
% Hint: get(hObject,'Value') returns toggle state of startstop
clc;
source= videoinput('winvideo');
set(source, 'ReturnedColorSpace', 'RGB');
set(source, 'FramesPerTrigger', 1);
set(source, 'TriggerRepeat', inf);
triggerconfig(source, 'manual');
start(source);
pause(2);
trigger(source);
if get(handles.startstop,'Value')
set(handles.startstop,'String','Stop');
set(handles.startstop,'Value',1);
drawnow();
else
set(handles.startstop,'String','Start');
set(handles.startstop,'Value',0);
clear(source);
stop(source);
end
i get the following error
??? Error using ==> imaqdevice.start at 91
Multiple VIDEOINPUT objects cannot access the same device simultaneously.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Image Acquisition Toolbox Supported Hardware in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!