Uncategorized

Unexpected performance difference between picamera and picamera2..


I’m trying to cobble together a Pi zero W with an ov5647 for use in remote monitoring. Out of convenience I first grabbed a pi0w with an old raspbian 9.1 and got rpi_camera_surveillance_system.py to fly with little trouble using the picamera module. As that install is somewhat of a relic I then installed 2023-12-05-raspios-bookworm-armhf-full on another pi0w. As the former picamera is deprecated in favor of picamera2, rpi_camera_surveillance_system.py wasn’t going to fly. Finding no obvious way to pull in the deprecated picamera to that install I found mjpeg_server.py based upon Picamera2 and additionally MJPEGEncoder, the latter of which substantially accelerates processing. The oddity I find is where the picamera based experiment consumes about 24% of the CPU during operation, the Picamera2/MJPEGEncoder combo swamps the CPU with a python3 proc at 98% CPU consumption which was hardly expected. There are quite a few moving pieces in all of this and it isn’t clear what options exist nor where I should be drilling down in my rummaging thus far. Doesn’t look hopefully gettine picamera installed in bookworm. And I’m unsure how to explain/remedy the upside-down performance observed with Picamera2. Any pointers, suggestions, much appreciated.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *