--------------------------------------------------------------------------- error Traceback (most recent call last) /tmp/ipykernel_1097/1662258382.py in <module> 11 12 # 显示原图和均衡化后的图像 ---> 13 cv2.imshow('Original', gray) 14 cv2.imshow('Equalized', equalized) 15 error: OpenCV(4.5.4) /tmp/pip-req-build-jpmv6t9_/opencv/modules/highgui/src/window.cpp:1274: 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'
时间: 2023-08-15 13:45:29 浏览: 50
这个错误是由于 OpenCV 库没有正确安装或者缺少依赖库导致的。可以尝试重新安装 OpenCV,并确保已经安装了 libgtk2.0-dev 和 pkg-config。如果你使用的是 Ubuntu 或 Debian 系统,可以使用以下命令安装缺少的依赖库:
sudo apt-get install libgtk2.0-dev pkg-config
如果你使用的是其他操作系统,请查看对应的安装文档进行安装。