python cv打开USB摄像头报错 CvCapture_python MSMF::initStream Failed to set mediaType

解决方法:

cv2.VideoCapture(0)

修改为

cv2.VideoCapture(0+cv2.CAP_DSHOW)

你可能感兴趣的:(python,python,计算机视觉)