|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: MJPG lag OpenCV
The docs seem to say that cv.QueryFrame returns "the just grabbed frame". If you have only 0.25 seconds of lag from an external camera through an embedded card to a PC and to a display, I would think you are fine. To measure the lag more accurately, consider something that the embedded board can control and a measurement made on the video capture. This will allow you to turn on an LED and determine how long afterwards it takes for the board to see the LED. In the past, I've done this using some clamps to hold everything in place and done the simplest code that measure the delay from a pixel's green value go from below a threshold to above the threshold.
If you have ten second lag, that seems like a significant issue. Running the LED test will help determine whether this is possibly caused by the transmission to the display or caused by the capture. Greg McKaskle |
|
#2
|
||||
|
||||
|
Re: MJPG lag OpenCV
Quote:
That .25 sec. is actually from an external USB webcam, connected directly to the PCDuino, and using TCP to deliver the "X" center of the target to the cRio. So, as you said, I think we're fine. |
|
#3
|
||||
|
||||
|
Re: MJPG lag OpenCV
I figured it out. It is really chance. With minimal changes, I was getting .25s of lag. I think the future looks good especially if we can get an SBC!
I am using C++, by the way (and I suggest that everyone do so). It is not too frequent after your basic program is done, to make changes, so a configuration file will work. It takes 1 second to compile on our slowest computer so it isn't too bad and the speed increase might be worth it! I don't know if CvCapture has this lag problem when your process too slow. I noticed when my FPS dropped too low, I would suddenly start getting tons of lag. It could also be a camera issue because I typically don't have this problem running our older, M1011 camera! As soon as I started to use the M1013 camera, bad things started to happen! Last edited by yash101 : 05-03-2014 at 19:39. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|