Hello,
I have a 12Mp HQ Camera connected to a Raspberry Pi4 (model B, 4Gb) - see below. I use picamzero to access the camera and save a picture. The simple code is attached at the end.
It takes an incredible 3.64s to execute the code and save the picture. Decreasing the picture resolution from (4056,3040) to (2592,1944) decreases the duration from 3.64s to 3.24s.
Is there any way (optimization, other library, etc...) that would make the usage of the camera more dynamic at max resolution?
Thank you!
Julien
I have a 12Mp HQ Camera connected to a Raspberry Pi4 (model B, 4Gb) - see below. I use picamzero to access the camera and save a picture. The simple code is attached at the end.
It takes an incredible 3.64s to execute the code and save the picture. Decreasing the picture resolution from (4056,3040) to (2592,1944) decreases the duration from 3.64s to 3.24s.
Is there any way (optimization, other library, etc...) that would make the usage of the camera more dynamic at max resolution?
Thank you!
Julien
Code:
pi@raspberrypi:~ $ rpicam-hello --listAvailable cameras-----------------0 : imx477 [4056x3040 12-bit] (/base/soc/i2c0mux/i2c@1/imx477@1a) Modes: 'SBGGR10_CSI2P' : 1332x990 [30.00 fps - (65535, 65535)/65535x65535 crop] 'SBGGR12_CSI2P' : 2028x1080 [30.00 fps - (65535, 65535)/65535x65535 crop] 2028x1520 [30.00 fps - (65535, 65535)/65535x65535 crop] 4056x3040 [30.00 fps - (65535, 65535)/65535x65535 crop]
Code:
from picamzero import Camerafrom time import sleepimport timePRGM_start_time = time.time()print('start')cam = Camera()#cam.preview_size = (192,108)cam.still_size = (2592,1944) #(4056,3040)#cam.start_preview()#sleep(1)cam.take_photo('text.jpg')#cam.stop_preview()print('end')PRGM_end_time = time.time()PRGM_duration = PRGM_end_time - PRGM_start_timeprint(PRGM_duration)
Statistics: Posted by SierraAlpha — Thu Dec 12, 2024 7:16 pm