It sounds like it's copying that large 36MB memory buffer that's taking the time. Most of these functions give you a copy of the image so that the underlying buffer can be recycled immediately back to the camera system. However, if you only want a small part of that image then it should be possible to do much better. You can go straight for the underlying dmabuf and copy only the bit you want. Something like this (untested):to copy out 200x200 pixels at offset (x, y).
Code:
with camera.captured_request() as request: with MappedArray(request, 'main') as m: image = np.copy(m.array[y:y+200, x:x+200])Statistics: Posted by therealdavidp — Wed Dec 04, 2024 8:16 am