The Wayback Machine - https://web.archive.org/web/20200520140456/https://github.com/ageitgey/face_recognition/issues/902
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv读取图像报错:352 环境为win10+pycharm+python3.7+opencv4.1.0 ,希望得到解决 #902

Open
RehobothRoselle opened this issue Aug 9, 2019 · 6 comments

Comments

@RehobothRoselle
Copy link

@RehobothRoselle RehobothRoselle commented Aug 9, 2019

import cv2 as cv
import numpy as np

print("-------hello python---------")
scr = cv.imread(r"C://Users//ASUS//Pictures//Saved Pictures//d.jpg")
cv.namedWindow("input image", cv.WINDOW_AUTOSIZE)
cv.imshow("input image", scr)
cv.waitKey(0)

cv.destroyAllWindows()

报错:cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

@RehobothRoselle
Copy link
Author

@RehobothRoselle RehobothRoselle commented Aug 9, 2019

已经解决

@fang0814
Copy link

@fang0814 fang0814 commented Aug 11, 2019

import cv2 as cv
import numpy as np

print("-------hello python---------")
scr = cv.imread(r"C://Users//ASUS//Pictures//Saved Pictures//d.jpg")
cv.namedWindow("input image", cv.WINDOW_AUTOSIZE)
cv.imshow("input image", scr)
cv.waitKey(0)

cv.destroyAllWindows()

报错:cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

我也报了这个问题,可以帮帮我吗?

@RehobothRoselle
Copy link
Author

@RehobothRoselle RehobothRoselle commented Aug 11, 2019

你的代码是什么样的发来看看可以吗

@fang0814
Copy link

@fang0814 fang0814 commented Aug 15, 2019

不好意思啊对不起 好久没看GitHub

@moneyleaf
Copy link

@moneyleaf moneyleaf commented Sep 14, 2019

你好,请问你是怎么解决这个问题的

@WenBoNie
Copy link

@WenBoNie WenBoNie commented Nov 13, 2019

I think the path of your picture is incorrect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.