Quantcast
Viewing all articles
Browse latest Browse all 5055

Camera board • Re: Camera Module 3 Wide - Cannot allocate memory

On reflection, I see no particular reason why could couldn't stop the camera while you're waiting. Though it depends on the camera driver, I think mostly they will power down while the camera is stopped. You probably want to run the camera for a couple of seconds prior to each capture to let your control algorithms adapt to any changing conditions, so it might look like

Code:

import timefrom picamera2 import Picamera2picam2 = Picamera2()config = picam2.create_still_configuration()picam2.start(config)for i in range(9999999):    time.sleep(2)    picam2.capture_file(f"image_{i:04}.jpg")    picam2.stop()    time.sleep(28)    picam2.start()
I don't think there's any way to compact or tidy up the CMA, other than by closing the camera system completely, though that might also be an option. Are you running libcamera-still just once with the timelapse option, or have you tried re-starting it every 30 seconds or so with a new filename?

Statistics: Posted by therealdavidp — Fri Jul 05, 2024 10:36 am



Viewing all articles
Browse latest Browse all 5055

Trending Articles