标签:
error: (-215) size.width>0 && size.height>0 in function imshow
1 img2 = cv2.rectangle(frame, (x,y), (x+w,y+h), 255,2) 2 cv2.imshow(‘img2‘,img2)
调试时可发现img2的类型为NoneType.即img2为empty
改为如下
1 cv2.rectangle(frame, (x,y), (x+w,y+h), 255,2) 2 3 cv2.imshow(‘img2‘,frame)
标签:
原文地址:http://www.cnblogs.com/weixinforspurs/p/5568423.html