Open RehobothRoselle opened 4 years ago
已经解决
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'
我也报了这个问题,可以帮帮我吗?
你的代码是什么样的发来看看可以吗
不好意思啊对不起 好久没看GitHub
你好,请问你是怎么解决这个问题的
I think the path of your picture is incorrect
@WenBoNie I Think you are correct
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'