Go to Post The GDC is the Grinch because they just stole my Christmas! - scottmacdonald [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 05-03-2014, 12:55
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

There is a constant lag of 10 seconds. The 15fps is the max I allow the camera to send. Also, I actually think the program is already running at 15 fps. I have a timer and I just do a frequency calculation, so running at ~50ms lag, I get 60fps. I believe that the program is actually running at 15fps already. I doubt the problem is with my processing because when I run from my internal camera with 4 times the resolution, I get very little lag.

Here is my retrieval code:

PHP Code:
CvCapture *cam1 NULL//null required on linux otherwise crash will occur
cam1 cvCaptureFromFile("http://10.11.65.13/mjpg/video.mjpg");
while(
1) {
    
Mat rawImg cvQueryFrame(cam1);
    if(
trackTargets) {

    }
    if(
trackBalls) {

    }
    if(
trackRobots) {

    }
    
imshow("Window"rawImg);
    
waitKey(1);  //1 is lowest possible

 


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 04:50.

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