I wasn't totally clear, are you asking whether you can change the size of the camera output at runtime?...
Now, how do I alter the 1000 x 1000 preview when the camera is live? Is there something like camera.preview_configuration_size=(1500, 1000) where I might stretch the window when the preview is running?
The size of the output images produced by the camera system can only be changed by stopping, reconfiguring and restarting the camera system. This does all take a few moments and is therefore not seamless. It will in general require new resources to be allocated, the image sensor may have to be reprogrammed, and so on. The camera system on the Pi has always behaved like this.
But clearly the ScalerCrop can be updated at runtime - because it doesn't affect the size of the images that the camera system outputs, and because it doesn't need to reprogram the image sensor. I don't know if there's a solution in reading the largest field of view that you might need from the sensor, and then using a mixture of ScalerCrop and cropping/scaling/windowing up in the application - though that might get expensive.
Statistics: Posted by therealdavidp — Thu Jan 18, 2024 1:26 pm