raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
894 stars 189 forks source link

[HOW-TO] Is still_during_video truly full resolution still or is it a frame from video? #1096

Open spetca opened 3 months ago

spetca commented 3 months ago

As the title suggest is this example: https://github.com/raspberrypi/picamera2/blob/main/examples/still_during_video.py

truly a full resolution still using the whole sensor or is it simply a frame grab from video?

davidplowman commented 3 months ago

It's the highest resolution image you can get from the resolution at which the sensor is currently running.

In that example the sensor might be running at a 2028x1520 resolution (for an HQ cam, for example). This is half the full sensor resolution in each dimension and is chosen so as to achieve a higher framerate.

The video recording is only VGA, but the still capture is genuinely 2028x1520 and not taken from the VGA video. However, it's not the full 4056x3040 that this sensor would be capable of.

You could run the sensor at its full resolution (4056x3040 for the HQ cam), but you wouldn't achieve the same video framerate, and you might also have memory problems. The reason for all these difficulties is that you can't switch the sensor between its 2028x1520 and 4056x3040 modes instantaneously just to grab a still image - it takes an appreciable portion of a second to make the resolution change and then go back again.