python调用cv2.imshow出现错误The function is not implemented

错误信息为

cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:717: 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 'cvWaitKey'

解决方式是pip 安装 opencv-contrib-python
pip install opencv-contrib-python

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注