在尝试对摄像头传回视频进行实时目标检测时,需要将模型返回的生成图进行显示(故排除因路径问题而报错),cv2.imshow()出现错误。
报错如下:
error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows. GTK+ 2.x or Cocoa 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’
在anaconda prompt 对应环境下安装opencv-contrib-python
pip install opencv-contrib-python
-------tbc------
有用请哦~