From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision USB3 driver buffering and latency

Solved!
Go to solution

Hi,

i'm dealing with real-time image acquisition and processing on a IC-3173 running linuxRT, with a USB3 cam. Acquiring only a sub-image (not the full frame), i can get frame rates as high as 400Hz, but it appears that the latency between the real world and the time when the image is available in my app seems to be around 20ms. The cam itself must have a latency below 5ms at this rate, so i wonder about the buffering of the Imaq USB3 driver. In the configure_acquisition vi (in continuous mode) what are the valid entry for the number of buffers ? What's the better value for the lowest latency (i guess the minimum ?). Same question for the buffer_number_mode in the Get_image vi...

Thanks for any clue,

vincent

Vincent
0 Kudos
Message 1 of 3
(2,316 Views)
Solution
Accepted by topic author VdG

Hi Vincent,

 

To answer your question regarding numbers of buffers, there is no upper limit besides available memory. The lower limit I'd have to check but is probably 3-5 for a continuous acquisition. However, the choice of number of buffers doesn't actually affect latency directly, unless you specifically are reading back images from further back in the queue. If you always retrieve the latest image (Buffer mode next or newest), then the number of buffers used won't affect your latency.

 

In trying to achieve the lowest latency, keep in mind there are a few items involved you have to consider. There is the trigger latency, the exposure time, the sensor readout time, the transfer time (might be overlapped with readout), and then finally the overhead to retrieve the image from the driver.

 

Without knowing the specifics of your camera, sensor ROI, etc, I can't really give you hard numbers of all the sources of latency you may be seeing. I have attached a presentation I gave a year ago at the AIA Vision Show that dives into some of these. Hopefully it helps.

 

Eric

Message 2 of 3
(2,273 Views)

Thanks eric for this usefull paper. I'll play with the buffer mode when reading and see if it's actually lowering the latency.

 

All the best,

Vincent
0 Kudos
Message 3 of 3
(2,258 Views)