I'm trying to use a toggle button to start and stop video acquisition but i get the following error. Could any1 help???
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Image Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!