Ask Your Question

JPJP's profile - activity

2020-12-10 22:58:48 -0600 received badge  Notable Question (source)
2019-04-09 12:44:42 -0600 received badge  Popular Question (source)
2017-09-14 15:49:03 -0600 asked a question cv2.fisheye camera calibration (Python)

cv2.fisheye camera calibration (Python) I am trying to calibrate wide-angle/fisheye lenses in OpenCV using python and th

2017-08-21 12:12:19 -0600 answered a question Multi-Cam Support on Raspberry Pi

Bump. Any ideas?

2017-08-14 11:28:32 -0600 asked a question Multi-Cam Support on Raspberry Pi

I am running Python 3.4, Open CV 3.2, Raspbian Jessie, and two ELP Mini USB Cameras. When I open the two cameras:

cap0 = cv2.VideoCapture(0)
cap1 = cv2.VideoCapture(1)

I get the following error in the console every time, which can cause a variety of issues with displaying/saving the camera images:

VIDIOC_QUERYCTRL: Input/output error
VIDIOC_QUERYCTRL: Input/output error

Running dmesg gives:

uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -110 
uvcvideo: Failed to query (GET_DEF) UVC control 3 on unit 2: -110

I am a newbie to OpenCV and raspberry pi/linux, but from what I've been able to gather there's an issue with Video4Linux where it produces the error because it can't distinguish between the two identical cameras plugged in. If I swap one of the cameras out such that there is two different camera models plugged into the Pi the error is no longer produced and everything works reliably. However, I would like to use the two identical cameras.

I'm hoping there may be some way to explicitly give camera ID's in VideoCapture(index) rather than just the generic 0 or 1 index. Any insight is greatly appreciated and or any other potential work arounds to prevent the error. Thank you!