Hello @erik ,
Thanks for this quick answer ! and sorry for this late return...
For the first point I known that this example was not the most performant, I just linked it to put some context on what I was doing.
In fact, I started from this example by removing everything that could have "side effects" on performance and just keeping a callback on the ISP output in the C++ code.
Indeed 4K is a lot, but the objective was to have the best possible resolution without loss of data during the transfer. That's why the resolution and encoding was not necessarily the first choice ^^
By lowering the resolution to 1080P and by using the video encoder (MJEPG) I can reach about 15 to 20FPS, but a the expense of a loss of precision on the output of the detection algorithm that will consume the image.
Thank you for taking the time to answer my question 😃
I'll let you know if I find an effective implementation to this problme 👍️