Difference in time of getting the frame
Hello All,
I am using VideoCapture to capture image frame from camera using
opencv and QT So when i specify frame rate of 30 pfs the time taken to capture
the image (cap >> mat) is about 0.1 millisec.
If i increase the rate to 50 or 60 fps the time required to fetch the frames increases about 15-20 millisec.
So basically i want to know the exact reason for the time lag. If we request higher frame rate does camera take time to respond and the lag occurs? Every camera has buffer memory. If we request at higher frame rate the camera should provide same from buffer or is it that camera flushes the buffer if our request receives that frame?
Well, with 50/60fps, you have a delay between frames of 20/16ms respectively. So the delay of
cap>>mat
is in fact the time needed to take the next frame.Probably if you add in your code the waiting (
usleep(20000)
), the image transfer will be instantaneous.