您当前的位置: 首页 >  ar
  • 7浏览

    0关注

    478博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

cv2.imshow error: The function is not implemented. Rebuild the library with Windows...

高精度计算机视觉 发布时间:2022-06-25 13:58:57 ,浏览量:7

在python中调用cv2.imshow,出现这个一个报错:

cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1268: 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'

解决办法:安装 opencv-contrib-python

pip install opencv-contrib-python

Collecting opencv-contrib-python   Downloading opencv_contrib_python-4.6.0.66-cp36-abi3-win_amd64.whl (42.5 MB)      |████████████████████████████████| 42.5 MB 234 kB/s Requirement already satisfied: numpy>=1.17.3 in e:\anaconda3\envs\torch\lib\site-packages (from opencv-contrib-python) (1.21.5) Installing collected packages: opencv-contrib-python Successfully installed opencv-contrib-python-4.6.0.66

PS: 看源码,imshow正常来讲是在highgui中的,不会依赖contrib。不清楚是否是最新的库中调用了新的函数。

关注
打赏
1659856567
查看更多评论
立即登录/注册

微信扫码登录

0.0534s