Bootstrap

_imshow(winname.encode(“unicode_escape“).decode(), mat) cv2.error: OpenCV(4.10.0)

_imshow(winname.encode("unicode_escape").decode(), mat) cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: 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'

没有安装cv2扩展包

  1. 首先尝试安装opencv-contrib-python
  2. pip install opencv-contrib-python
  3. 如果上述方法不奏效,确保您安装的opencv-contrib-python版本与opencv-python版本相匹配

;