I'm building an application targeting Ultra96 using 2018.2 tools and using the OpenCV libraries provided by Petalinux. The following simple code to display video captured from a USB camera has a ~3 second lag between camera capture and monitor display (framerate seems OK). I assume it's related to the video buffer but I can't seem to get rid of it. The same code running in the DNNDK examples has no lag.
ANy ideas on how to eliminate the lag?
(The following operations are actually implemented to run in seperate threads as in the DNNDK examples)
camera >> img;