Circle buffer for images from webcam

2 ビュー (過去 30 日間)
Isa Amirov
Isa Amirov 2020 年 7 月 11 日
回答済み: Srivardhan Gadila 2020 年 7 月 15 日
Hi
Please tell me how to organize a circular buffer of images from the camera.
This is my code that allows to shoot a image stream. And I want to write them to a circular buffer for later processing
clear all;
devs = webcamlist;
cam = webcam(devs{1});
global LOOP_RUNNING;
LOOP_RUNNING = true;
img_display = figure('CloseRequestFcn',@my_closereq);
while (LOOP_RUNNING)
img = snapshot(cam);
subplot(2,2,1),imshow(img);
pause(0.05);
end
function my_closereq(~,~)
global LOOP_RUNNING;
LOOP_RUNNING = false;
delete(gcf);
clear('cam');
return;
end

回答 (1 件)

Srivardhan Gadila
Srivardhan Gadila 2020 年 7 月 15 日
You can refer to the Insert elements into a 4D array MATLAB Answer which might help you to get started on your implementation. The following resource might also help: circular buffer.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by