Hello guys, I am struggling with the getsnapshot function in Linux platforms. With the next code I am able to visualize the video from my webcam with the preview command, but the message "linuxvideo: A frame was dropped during acquisition." appears when I try to get an snapshot. Isn't it weird? What should I do to correctly acquire frames from the webcam?
clc, clearvid = videoinput('linuxvideo',1); set(vid,'FramesPerTrigger',1);set(vid,'TriggerRepeat',Inf);set(vid,'ReturnedColorSpace','rgb')vidRes = get(vid, 'VideoResolution');nBands = get(vid, 'NumberOfBands');ax = preview(vid);frame = getsnapshot(obj);delete(vid);
Best Answer