Ask Your Question
0

Object detection on ipcamera is delayed as compared to webcam why ?

asked 2015-02-05 03:43:30 -0600

sid gravatar image

updated 2015-02-06 05:27:17 -0600

I have done facial detection and TLD(using OpenTLD) on opencv 2.4 C++ . To alter the code to stream ipcamera i did this.

VideoCapture captureDevice; string videoStreamAddress = "http://admin:[email protected]:80/video/mjpg.cgi?&.mjpg"; captureDevice.open(videoStreamAddress); //in main loop captureDevice>>frame; //in main loop

It feels like it waits for each frame to process unlike webcam which maybe dropping frames . i have done ipcamera opencv video stream (without object detection code) using wired ethernet and its quite realtime like webcam , but when i run object detection on it , it delays much more than webcam .Video resolution of both are same.

please help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-09 10:25:23 -0600

sid gravatar image

Finally solved the problem by my own .

using a 3 iteration loop in my main loop:

for(int i=0; i<2; i++) { captureDevice>>frame; } This lowered the frame rates to 14fps , but with no delays( caused due to buffering ), Other approach i found is to create seperate thread for capturing frames and processing it .

edit flag offensive delete link more

Comments

i am also facing same problem , i am working on object detection with tensorflow , and i am used python code how solve this issue in python , please help

naveen_gowda gravatar imagenaveen_gowda ( 2020-03-14 02:26:45 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-05 03:43:30 -0600

Seen: 763 times

Last updated: Feb 09 '15