问题:
cv2.error: OpenCV(3.4.18) /io/opencv/modules/highgui/src/window.cpp:659: error: (-2:Unspecified error) 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'
1.安装对应版本opencv-contrib-python
pip3 install opencv-contrib-python(38条消息) opencv报错The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support_看看炳前在学什么的博客-CSDN博客
2.还是出现错误
我的问题:自己修改过yolov5的detect.py的代码,把view-img修改成true了。
解决:在detect.py中找到view-img后改为false。
思路来源: