Azzera filtri
Azzera filtri

Saving Images Captured by Raspberry Pi Camera

3 visualizzazioni (ultimi 30 giorni)
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 Commento
Walter Roberson
Walter Roberson il 5 Dic 2021
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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Support Package for Raspberry Pi Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by