Я запускаю этот код в MATLAB, но он возвращает голубой кадр
obj = videoinput('winvideo', 1);
% Select the source to use for acquisition.
set(obj, 'SelectedSourceName', 'input1')
% View the properties for the selected video source object.
src_obj = getselectedsource(obj);
get(src_obj)
% Acquire and display a single image frame.
frame = getsnapshot(obj);
image(frame);
% Remove video input object from memory.
delete(obj);
Но предварительный просмотр видео работает хорошо. ![getsnapshot output](https://i.stack.imgur.com/3hXi5.jpg)