上手YOLOV8,训练完了,生成了权重pt文件,用cv2调用摄像头,失败,报错
[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:159 cv::obsensor::getStreamChannelGroup Camera index out of range
搜索了下,说是Videocapture方法得传参,加上,不报错了,但是警告,没法用
[ WARN:[email protected]] global cap.cpp:344 cv::VideoCapture::open VIDEOIO(DSHOW): backend is generally available but can't be used to capture by index
有人说要摄像头索引改为700能成的,也有说不一定700,自己加循环逐个测摄像头的索引,都没成。
琢磨了好一会,发现者自己这台电脑不用CAP_SHOW, 改为 CAP_MSMF,过了
标签:cv2,700,报错,VideoCapture,cv,摄像头 From: https://www.cnblogs.com/mozzie/p/18325305