解决cv2.error:OpenCV(4.7.0)D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp.....
Posted 九江、码农
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决cv2.error:OpenCV(4.7.0)D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp.....相关的知识,希望对你有一定的参考价值。
在安装opencv-python和opencv-contrib-python后,运行detect.py出现下面错误
解决方法如下:
第一种情况:
- 首先如果你是通过conda命令安装的opencv,那么卸载它
conda uninstall opencv
- 然后使用pip命令安装opencv
pip install opencv-python
然后再去执行你的程序,他就没问题了
第二种情况:
- 首先检查opencv-python和opencv-contrib-python两者版本是否一致,不一致则卸载低版本的
pip uninstall opencv-python
pip uninstall opencv-contrib-python
- 然后使用pip命令安装opencv(举例)
pip install opencv-python
pip install opencv-python -i https://pypi.douban.com/simple
如果pip下载过慢出现错误,使用如下命令进行下载
pip install opencv-python -i https://pypi.douban.com/simple
参考链接:opencv中“The function is not implemented“错误解决方案_大王免礼的博客-CSDN博客
以上是关于解决cv2.error:OpenCV(4.7.0)D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp.....的主要内容,如果未能解决你的问题,请参考以下文章
opencv cv2.imread()报错: error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘
成功解决sub_div.insert(points)cv2.error: OpenCV(3.4.1) C:projectsopencv-pythonopencvmodulesimgproc
解决“cv2.error: OpenCV(3.4.2) C:projectsopencv-pythonopencvmoduleshighguisrcwindow.cpp:356:...”
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/color.cpp:182: error:
cv2.error: OpenCV(4.5.2) .error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
cv2.error: OpenCV(4.5.5) D:aopencv-pythonopencv-pythonopencvmodulesobjdetectsrccascadedetect