在用harries角点检测算法的过程中,遇到了这个报错:
cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1272:
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'
然后先问了一下gpt,gpt说 :
我估计可能是版本问题,最后找到了这个链接 :
Link
那么要怎么解决呢?
执行下面命令即可 :
This solution seems to work for a majority of users, but not all. If you are in this case, see the proposed answer by Sachin Mohan.
I had the exact same error using yolov5, on Windows 10. Reinstalling the library by typing
pip uninstall opencv-python
then文章来源:https://www.toymoban.com/news/detail-772621.html
pip install opencv-python
后面就可以显示图像了;文章来源地址https://www.toymoban.com/news/detail-772621.html
到了这里,关于cv2.error: OpenCV(4.8.1) D:xxxerror: (-2:Unspecified error) The function is not implemented.报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!