Go to Post Rule 1. Never take Dave's hint's seriously. Rule 2. Watergame. - AndyB [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-03-2014, 17:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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   Spotlight this post!  
Unread 05-03-2014, 18:17
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,350
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: MJPG lag OpenCV

Quote:
Originally Posted by Greg McKaskle View Post
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......

Greg McKaskle
Thanks for looking into that Greg. My network here at work does not allow me access to the docs.opencv.org site for some odd security reason.

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.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #3   Spotlight this post!  
Unread 05-03-2014, 19:30
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi