Delay in frame grabbing with OpenCV3 and Ubuntu 16.04.

asked 2018-01-24 10:56:50 -0500

dkj5042 gravatar image

updated 2018-01-24 10:58:24 -0500

OpenCV => 3.2 Operating System / Platform => Ubuntu 16.04 Python Detailed description

I tried to set the buffersize to minimize the delay in frames (there seems to be a delay of 100 ms in getting any frame) by using the following command in a python code:

cap = cv2.VideoCapture(0)

a=cap.get(cv2.CAP_PROP_BUFFERSIZE) # CV_CAP_PROP_BUFFERSIZE

print 'Buffersize', a

cap.set(cv2.CAP_PROP_BUFFERSIZE,1)

a=cap.get(cv2.CAP_PROP_BUFFERSIZE) # CV_CAP_PROP_BUFFERSIZE


But get the following error-- and then the code ignores the error and moves ahead with the processing.

VIDEOIO ERROR: V4L2: setting property #38 is not supported

The main issue is to get rid of the 100 ms delay.

It seems that the Linux video driver maintains a buffer before the system can use the image (i.,e, read or write). Does anyone have any experience with it? The same problem seems to exist if we use ROS to talk to the camera.

edit retag flag offensive close merge delete