opencv学习

cap = cv2.VideoCapture(0)

ret, frame = cap.read()

cv2.imshow("name", frame)报出如下错误

error: ..\..\..\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow

在第一句下面加上time.sleep(2)后可解决

你可能感兴趣的:(opencv学习)