Problem writing photos on RPi

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Problem writing photos on RPi

Post by /RaspberryPi »

Image Hello everyone,
I'm currently working on a project where I'm asked to save (write) frames that I capture with a camera on a Raspberry Pi. The capture time is around 33ms ( = 1/FPS and FPS = 30) and within that period I save the frames that I captured on the RPi's SD card.
I'm programming with Python. I used a method of OpenCV to write the frame with a png format but that takes over 50ms which is over the capture time. So I decided to use numpy to save the frames in a npy format and that takes few ms (3ms).
Running some test of 10 minutes long, I get these results :
https://preview.redd.it/669kk7t7mqc91.p ... p&258dd9ce
On average and for most of the times, I get around 3ms time to save one frame. But also very frequently, I get these peaks that reach up to half a second (a loooot). And this cause me to lose frames which is really not what I want.
I've tried to save the frame in a jpg format (with OpenCV) or qoi format (with qoi) but nothing changes.
I've tried the same experience on a PC and it worked fine which made me conclude that it is related to the RPi.
Do you guys have any thoughts of what does this come from ? Do you suggest any other tests that I can do ?
Thanks a lot for your help !

submitted by /u/AskMammoth2232
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”