OpenCV Python: cv2.VideoCapture can only find 2 of 3 cameras, Windows Camera app finds all

前端 未结 4 803
自闭症患者
自闭症患者 2021-02-19 00:38

I\'m trying to create 3 real-time capture frames with webcams into a USB hub into my laptop. Using the \"camera\" app on Windows, I can change the camera source one at a time an

4条回答
  •  孤城傲影
    2021-02-19 00:54

    having two video input devices does not automatically mean that their IDs are 0 and 10. Try to access the all cameras by increasing to about 500 or more instead of 10

    cams_test = 500
    for i in range(0, cams_test):
        cap = cv2.VideoCapture(i)
        test, frame = cap.read()
        if test:
            print("i : "+str(i)+" /// result: "+str(test))
    

    I think you are only testing

提交回复
热议问题