Maximizing webcam FPS using multi-threaded frames withdraw

1 回表示 (過去 30 日間)
Shaul Shvimmer
Shaul Shvimmer 2020 年 3 月 16 日
編集済み: Shaul Shvimmer 2020 年 3 月 17 日
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 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by