error in video recording on a windows
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
clear all; %% clear all privious variables
clc;
close all
cam = webcam('Integrated Webcam')
vid = videoinput('winvideo',1);
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb');
% vid.FrameRate =30;
vid.FrameGrabInterval = 1; % distance between captured frames
%start(vid)
aviObject = VideoWriter('myVideo.avi'); % Create a new AVI file
open(aviObject)
for iFrame = 1:150 % Capture 150 frames
% ...
% You would capture a single image I from your webcam here
% ...
I=getsnapshot(vid);
%imshow(I);
F = im2frame(I); % Convert I to a movie frame
writeVideo(aviObject,F); % Add the frame to the AVI file
pause(0.1)
end
close(aviObject); % Close the AVI file
stop(vid);
But I keep getting this error: Error using videoinput (line 532)
winvideo: Image acquisition device is not accessible.
Insufficient system resources exist to complete the requested service.
Make sure no other objects or applications are accessing the same device.
Error in AcquireVideo (line 11)
vid = videoinput('winvideo',1);
0 Commenti
Risposte (1)
Gouri Chennuru
il 15 Dic 2020
Hi Ana,
As per my understanding, you have to install the support packages for Image accquisition toolbox adapters.
If the usb webcam doesnt wanna install winvideo, I would recommend you to install Image Acquisition Toolbox Support Package for "OS Generic Video Interface".
Refer to these Link for more information.
Hope this Helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!