简体   繁体   English

Python - cv2 package 没有显示任何 function 输入 Z27584A7E225BC33F33F

[英]Python - cv2 package is not showing any function while typing in pycharm

import cv2
img = cv2.imread("Resources/0017.png")
cv2.imshow('Window',img)

but when I am typing cv2.但是当我输入 cv2. it doesn't show/suggest that I can use "imshow" function.它没有显示/建议我可以使用“imshow”function。

Error I'm getting is:我得到的错误是:

cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6lylwdcz\opencv\modules\highgui\src\window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow' cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6lylwdcz\opencv\modules\highgui\src\window.cpp:376: 错误:( -215:断言失败)function 'cv::imshow' 中的 size.width>0 && size.height>0

The assertion failed meaning that the file path does not exist or the file is corrupted.断言失败意味着文件路径不存在或文件已损坏。 Please check the path for your image and make sure it is spelled correctly, and that the image is in the same folder as the python program (the working directory), or include the whole path.请检查您的图像的路径并确保拼写正确,并且图像与 python 程序(工作目录)位于同一文件夹中,或包含整个路径。

Additional Links / Sources其他链接/来源
Python openCV error while using cv2.imread() 使用 cv2.imread() 时出现 Python openCV 错误
I couldn't get past this error in open cv? 我无法在 open cv 中解决这个错误?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM