Ask Your Question
0

Delay in frame grabbing with OpenCV3 and Ubuntu 16.04.

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

dkj5042 gravatar image

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

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

Comments

Any luck with this issue, I am having the same problem

gideon gravatar imagegideon ( 2020-07-02 15:26:17 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-02-13 08:04:29 -0600

When I try to set the buffer config, I get a "False" in return

In  []: stream.set(cv2.CAP_PROP_BUFFERSIZE,1)                                                                                 
Out []: False

Everyone else seems to just manually flush the buffer themselves.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-01-24 10:56:50 -0600

Seen: 4,610 times

Last updated: Jan 24 '18