DVXplorer Camera: getNextEventBatch() Call Frequency

57 views
Skip to first unread message

T

unread,
Jul 29, 2024, 9:27:51 AMJul 29
to dv-users
Hello,

I am currently investigating the performance of the DVXplorer camera using the DV-Processing API. I am encountering an issue where the dv::io::CameraCapture::getNextEventBatch() function appears to have a limitation on the frequency of its invocation. Specifically, regardless of the number of events detected by the camera, the Event Frames Per Second (EFPS), bias, or any other settings, I am unable to retrieve events from this method more frequently than every 10 ms. Upon inspecting the returned events, I can see that many of them have timestamps with a very high temporal resolution.

In theory, the dv::io::CameraCapture::getNextEventBatch() method should provide the events that have occurred up to that point, as described in the method's documentation: "Event batch or std::nullopt if no events were received since last read." However, I am consistently receiving std::nullopt if I call this method within 10 ms of the previous call, which suggests that no events were detected. This is not accurate, as I can see from the timestamps that events are indeed present during this period. It seems like there is an issue where the method does not retrieve the available events within this time frame.

Is this a normal behavior? 

Thank you in advance.

T

unread,
Aug 5, 2024, 7:14:10 AMAug 5
to dv-users
I am still investigating this behavior. While debugging on Linux using Wireshark, I observed that I am receiving USB packets from the camera with a 1 ms interval between each packet. I am thinking about some USB / OS buffering "issue". Any thoughts?

Tobi Delbruck (INI)

unread,
Aug 5, 2024, 9:10:42 AMAug 5
to dv-u...@googlegroups.com
There is an "early packet timer" that we implemented on the very first
DVS128 logic that transfers the USB FIFO to USB clock domain on the
camera with at most some given interval; the interval can go even
shorter when the events fill up the device USB FIFOs. It looks like it
is set to 1ms. You might be able to set this early packet timer down to
1/8ms (125us) using low level DV API.

T

unread,
Aug 6, 2024, 9:33:55 AMAug 6
to dv-users
Hello tobi,

Thank you for your reply. I will look into it. 
If you have more specific names, please let me know.

Have a nice day

Luca Longinotti

unread,
Aug 9, 2024, 9:03:44 AMAug 9
to dv-u...@googlegroups.com
Hello,

the 10ms come from libcaer, which by default batches data in 10ms packets. dv-processing currently uses libcaer to get the data from the cameras, it simply takes these packets of data and puts them on a queue, which getNextEventBatch() then consumes.
See here for an explanation on how to change it:

Hope this helps, have a great day!
-- 
Luca Longinotti (llongi)

Staff Embedded Systems and Software Engineer
iniVation AG
A SynSense Group company
Reply all
Reply to author
Forward
0 new messages