opencv和python下,运行对图片的读取程序时出现的问题!!!
程序代码:importcv2importsystry:filename=sys.argv[1]except:filename="abc.jpg"img=cv2.imrea...
程序代码:
import cv2
import sys
try:
filename = sys.argv[1]
except:
filename = "abc.jpg"
img = cv2.imread( filename )
cv2.namedWindow("demo1")
cv2.imshow("demo1", img)
cv2.waitKey(0)
错误:OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/dml/下载/opencv-2.4.10/modules/highgui/src/window.cpp, line 261
Traceback (most recent call last):
File "/home/dml/下载/SimpleCV-1.3/test/test.py", line 10, in <module>
cv2.imshow("demo1", img)
cv2.error: /home/dml/下载/opencv-2.4.10/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow 展开
import cv2
import sys
try:
filename = sys.argv[1]
except:
filename = "abc.jpg"
img = cv2.imread( filename )
cv2.namedWindow("demo1")
cv2.imshow("demo1", img)
cv2.waitKey(0)
错误:OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/dml/下载/opencv-2.4.10/modules/highgui/src/window.cpp, line 261
Traceback (most recent call last):
File "/home/dml/下载/SimpleCV-1.3/test/test.py", line 10, in <module>
cv2.imshow("demo1", img)
cv2.error: /home/dml/下载/opencv-2.4.10/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow 展开
展开全部
我的天,实在太乱了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询