yolov7detect.py文件调用本地摄像头,把source参数设为0
parser.add_argument('--source', type=str, default='0', help='source') # file/folder, 0 for webcam
报错:cv2.error: OpenCV(3.4.2) 一堆地址:The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
我原本的环境里opencv-python版本是4.1.2.30
参考链接:The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support-CSDN博客
我的解决方法,卸载opencv-python
pip uninstall opencv-python
再重新安装
pip install opencv-python
pip install opencv-contrib-python
就好使了文章来源:https://www.toymoban.com/news/detail-815380.html
文章来源地址https://www.toymoban.com/news/detail-815380.html
到了这里,关于YOLOv7调用摄像头检测报错解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!