Maximizing webcam FPS using multi-threaded frames withdraw
1 次查看(过去 30 天)
显示 更早的评论
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');
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!