I'm trying to get something like "live preview" based on the actual Bayer Array Pixels for precise high resolution measurements (I need high spatial resolution + 10 Bit data + some custom color scale). Right now I have some code which reads the sensor according to http://picamera.readthedocs.io/en/release-1.12/api_array.html#pibayerarray. I put the code in a loop which in each run reads bayer data and displays a subarray (say 400 x 300 pixels) by updating the same figure. However, this is really slow, time between two images is roughly 2 seconds. Any idea how to improve speed? I already tried to speed up by only plotting a sub array but that's not enough. Seems like bayer capture itself is really slow. Would there be any chance of getting higher image rate or is it limited by camera hardware?

  • From the linked docs it looks like bayer data always comes from a full resolution capture - I'm not sure you'll see performance benefits from working with sub-arrays. – goobering Aug 22 '16 at 15:58
  • 1
    You can try using capture_sequence with burst enabled (1.11 fixed an issue with repeat bayer captures under capture_sequence) but my guess is that the absolute best you'll manage is about 1fps. Bear in mind the sheer size of the bayer captures and the limited IO capacity of the Pi. @goobering is also correct that sub-arrays won't help much - the full bayer data will still be copied from the GPU's memory (no way around that in Python I'm afraid) – Dave Jones Aug 22 '16 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.