64MP Still capture with Preview on Pi 5. Why so much delay when using switch_mode

Hi there,

I’m trying to implement a “simple” preview and still capture application in python. The preview is streamed as jpg images in lowres. The still is taken in full res 64MP.

I use switch_mode_and_capture_image to take the still and reconfigure the camera.
for some reason just this command takes already 3 seconds. Is there a way to take the 64mp image within less than 0.5 seconds ? When taking several pictures the delay is much better. But the switch from preview to still mode is really slow and unpractical for a fluent user experience. If I’m right, it is not possible to use a 64mp preview due to the low frame rate in full res.
I’d appreciate any hints.

#By the push of a button, the image is taken
  beforetime = datetime.now()
  pilimg = camera.switch_mode_and_capture_image(configStill)
  print("took some time: " + str(datetime.now() - beforetime))

following the configuration of the camera:


appWidth = 1280
appHeight = 720
camera = Picamera2(allocator=PersistentAllocator())

# === Create Configurations ====================================================

configPreview = camera.create_preview_configuration()
camera.preview_configuration.main.size = (appWidth, appHeight)
camera.preview_configuration.main.format = 'BGR888'
camera.configure('preview')

# ------------------------------------------------------------------------------

configStill = camera.create_still_configuration()
camera.still_configuration.enable_raw()
camera.still_configuration.main.size = camera.sensor_resolution
camera.still_configuration.buffer_count = 2
camera.still_configuration.colour_space = ColorSpace.Sycc()
camera.still_configuration.use_case = "fullresStill"
camera.start()

Hi,

No way for now. Basically speaking, switching mode is slower than capturing images directly.