kbingham / libcamera

libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/
https://libcamera.org
Other
167 stars 69 forks source link

Configuring internal frame queue #39

Open ghost opened 2 years ago

ghost commented 2 years ago

I'm using libcamera to grab frames on demand in some custom code, and it seems as though there is a 5-frame FILO queue that any given frame has to pass through before reaching my code, so that the result of any commanded acquisition is not seen until 5 acquisitions later. Is there any way to configure this so that the result of a commanded acquisition is seen by the caller immediately?

kbingham commented 2 years ago

This sounds like you are looking into the per-frame control feature of libcamera. That is not fully supported yet, but we're actively working on it currently. (it's not straightforward, as there are many components in play, with variable pipeline depths).

Can you share an example test code that demonstrates the requirements you are trying to meet?

Furthermore, I wonder if you are on an RPi, and in fact seeing that RPi drop frames to start with until the algorithms converge. How are you measuring or otherwise identifying this delay? It may be helpful to discuss how you are architecting your application to suit your needs.