v4l

Webcam doesn't read through OpenCV but does with guvcview

杀马特。学长 韩版系。学妹 提交于 2021-01-27 07:40:57
问题 I have a webcam of sorts that is quite old. I've been attempting to get it to work. I started out with guvcview which works, however it only gives me the first frame captured then stops. That's fine for now. I'm trying to recreate this behaviour using OpenCV. I'm on linux and using python. It is my understanding that my best bet here is to have OpenCV use v4l2 which is what guvcview is using. My long term idea is to get the first frame only, but do this in a loop to sort of get "video" but at

Webcam doesn't read through OpenCV but does with guvcview

淺唱寂寞╮ 提交于 2021-01-27 07:38:10
问题 I have a webcam of sorts that is quite old. I've been attempting to get it to work. I started out with guvcview which works, however it only gives me the first frame captured then stops. That's fine for now. I'm trying to recreate this behaviour using OpenCV. I'm on linux and using python. It is my understanding that my best bet here is to have OpenCV use v4l2 which is what guvcview is using. My long term idea is to get the first frame only, but do this in a loop to sort of get "video" but at

Webcam doesn't read through OpenCV but does with guvcview

不羁岁月 提交于 2021-01-27 07:37:33
问题 I have a webcam of sorts that is quite old. I've been attempting to get it to work. I started out with guvcview which works, however it only gives me the first frame captured then stops. That's fine for now. I'm trying to recreate this behaviour using OpenCV. I'm on linux and using python. It is my understanding that my best bet here is to have OpenCV use v4l2 which is what guvcview is using. My long term idea is to get the first frame only, but do this in a loop to sort of get "video" but at

Two webcams on one usb hub - bandwidth issues

最后都变了- 提交于 2019-12-18 09:07:14
问题 I'm using OpenCV 2.3 to capture video from two webcams on a Linux computer(Ubuntu 10.04) which only has one USB hub. I'm getting an error "videoc_streamon: No space left on device" when cv.QueryFrame is called for the second camera the first time and "vidioc_qbuf: invalid argument" on subsequent calls. I know that this is a USB bandwidth issue, so I tried lowering the resolution to 320 x 240 with cv.SetCaptureProperty, which appears to not change anything (confirmed by a call to cv

v4l2 very simple example [closed]

风流意气都作罢 提交于 2019-11-30 01:04:19
I'm looking for a simple example for camera access in Linux using V4L2. Where I can find it? As simple, as possible. Thanks, Raulp Try the uvccapture code here -> http://staticwave.ca/source/uvccapture/ It is very small yet very concrete example which makes use of all the V4l2 concepts (open,set format, allocate memory, Request Buffer, Dqbuffer and Query-buffer - all intems of ioclts). uvcgrab () function is the one to look for which makes use of Dqbuffer and Query-buffer. ioctl (vd->fd, VIDIOC_DQBUF, &vd->buf); ioctl (vd->fd, VIDIOC_QBUF, &vd->buf) While Studying it you can keep looking for

Two webcams on one usb hub - bandwidth issues

早过忘川 提交于 2019-11-29 14:55:31
I'm using OpenCV 2.3 to capture video from two webcams on a Linux computer(Ubuntu 10.04) which only has one USB hub. I'm getting an error "videoc_streamon: No space left on device" when cv.QueryFrame is called for the second camera the first time and "vidioc_qbuf: invalid argument" on subsequent calls. I know that this is a USB bandwidth issue, so I tried lowering the resolution to 320 x 240 with cv.SetCaptureProperty, which appears to not change anything (confirmed by a call to cv.GetCaptureProperty). What I need is some way to lower the bandwidth the cameras are using so that I can get

v4l2 very simple example [closed]

南楼画角 提交于 2019-11-28 22:01:47
问题 I'm looking for a simple example for camera access in Linux using V4L2. Where I can find it? As simple, as possible. Thanks, 回答1: Try the uvccapture code here -> http://staticwave.ca/source/uvccapture/ It is very small yet very concrete example which makes use of all the V4l2 concepts (open,set format, allocate memory, Request Buffer, Dqbuffer and Query-buffer - all intems of ioclts). uvcgrab () function is the one to look for which makes use of Dqbuffer and Query-buffer. ioctl (vd->fd,

OpenCV: can't set resolution of video capture

旧城冷巷雨未停 提交于 2019-11-27 13:57:53
问题 I am using OpenCV 2.4.5 on Ubuntu 12.04 64-bit. I would like to be able to set the resolution of the input from my Logitech C310 webcam. The camera supports up to 1280x960 at 30fps, and I am able to view the video at this resolution in guvcview. But OpenCV always gets the video at only 640x480. Trying to change the resolution with cap.set(CV_CAP_PROP_FRAME_WIDTH, 1280) and cap.set(CV_CAP_PROP_FRAME_HEIGHT, 960) immediately after the VideoCapture cap is created has no effect; trying to set