Saving Images Captured by Raspberry Pi Camera

3 次查看(过去 30 天)
Hi I want to have a standalone code on Raspberry Pi generated from a matlab function that takes images evey one second and save them in a directory of my Raspberry Pi... but in many websites they say that the captured image must be returned to host computer... How can I make it standalone?
function CaptureImage()
%#codegen
%Create raspi & webcam obj
raspiObj = raspi('192.168.1.101','pi','pi');
cam = webcam(raspiObj,1);
% Main loop
start = tic;
fprintf('Entering into while loop.\n');
while true
elapsedTime = toc(start);
%Process frames at 1 per second
if elapsedTime > 1
%Capture image from webcam
img = snapshot(cam);
%what should I add here to save captured image in Raspberry Pi
start = tic;
end
end
end
  1 个评论
Walter Roberson
Walter Roberson 2021-12-5
When I look at https://www.mathworks.com/help/supportpkg/raspberrypiio/ug/functions-supported-for-deployment.html it appears to me that the functions you are using should create img in the memory of the Raspberry Pi.
Deployment to the Raspberry Pi is relatively new; perhaps those sites were out of date.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by