在使用opencv中的cv2.imshow显示图片的时候总会出现如下错误:
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的时候安装顺序出现了问题,于是执行下面代码,重新安装
imshow就能成功显示图片了
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip install opencv-contrib-python
pip install opencv-python
参考资料:
https://stackoverflow.com/questions/67120450/error-2unspecified-error-the-function-is-not-implemented-rebuild-the-libra