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
}