-
While having fun in understanding the new picamera2-lib and trying to adapt the new lib to my existing software suite (based on the old picamera-lib) I stumbled upon a few things I could not figure out by reading/searching the examples and documentation. (System: RP4 with HQ sensor, socket-based client-server structure, MJPEG-encoded 2016x1520 frames (q=90) send from the RP4 to a WIN10 machine at 23 fps. Bandwidth used about 130 MBit/s) First, requesting an image resolution like this,
it seems I only get 2016 x 1520 px in the end. Libcamera reports:
So I think the camera is using the 2x2 binned mode here, but is cropping the image somewhat. The same thing kind of happens if I request the full sensor resolution:
and libcamera again reports
as requested. But: I only get 4032 x 3040 px images. (I needed here to use the still_configuration because the video_configuration ran out of buffer space). So again, the delivered image size is slightly smaller in x-dimension than the requested one. Has this behaviour something to do with buffer alignments or so? Is it caused by libcamera or the encoder used (simplejpeg)? A further question: the old picamera-lib (based on the Broadcom-stack) allowed to run the sensor at full resolution ( How can I request from libcamera the use of the non-binned 4056 x 3040 sensor mode while working with an output image size of 2028 x 1520 or so? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Think the recommended method is to specify an additional raw configuration at the full sensor resolution along with the main 1/2 resolution required image size. Not tested on an HQ camera, but with a V2.1 the following configuration drives the sensor into its max resolution mode but outputs a rescaled 'full format but 1/2 pixel density per axis' image.
Interestingly the achieved image size is also reduced horizontally, by 8 pixels in this case, for a 1632 x 1232 image |
Beta Was this translation helpful? Give feedback.
Think the recommended method is to specify an additional raw configuration at the full sensor resolution along with the main 1/2 resolution required image size.
Not tested on an HQ camera, but with a V2.1 the following configuration drives the sensor into its max resolution mode but outputs a rescaled 'full format but 1/2 pixel density per axis' image.
still_config = picam2.still_configuration(main={"size" : (1640,1232}), raw={"size" : (3280,2464)})
Interestingly the achieved image size is also reduced horizontally, by 8 pixels in this case, for a 1632 x 1232 image