Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8380

Camera board • Re: Pi camera maximum processing time between capture

$
0
0
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):

Code:

with camera.captured_request() as request:    with MappedArray(request, 'main') as m:        image = np.copy(m.array[y:y+200, x:x+200])
to copy out 200x200 pixels at offset (x, y).

Statistics: Posted by therealdavidp — Wed Dec 04, 2024 8:16 am



Viewing all articles
Browse latest Browse all 8380

Trending Articles