Maximizing webcam FPS using multi-threaded frames withdraw

1 visualización (últimos 30 días)
Shaul Shvimmer
Shaul Shvimmer el 16 de Mzo. de 2020
Editada: Shaul Shvimmer el 17 de Mzo. de 2020
I want to accelerate the webcam frame rate withdraw of the code below, I wasn't able to do that using 'parfor' from parallel computing toolbox, since the new created workers don't have 'cam' object (I think).
Any suggestions how to maximize the frames withdraw ?
Thanks!
clear all; clc;
len = 100;
weblist = webcamlist;
cam = webcam(string(weblist(1,1)));
img = snapshot(cam);
[r, c, ~] = size(img);
vid = zeros(r, c, 3, len);
tic
for i=1:len
vid(:, :, :, i) = snapshot(cam);
end
toc
clear('cam');

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by