OpenCV Error: (-215)size.width>0 && size.height>0 in function imshow

前端 未结 16 2473
既然无缘
既然无缘 2020-11-29 09:09

I am trying to make a face tracker that combines Haar Cascade Classification with Lucas Kanade good feature detection. However, I keep getting an error that I cannot figure

16条回答
  •  囚心锁ツ
    2020-11-29 09:23

    This error message

    error: (-215)size.width>0 && size.height>0 in function imshow

    simply means that imshow() is not getting video frame from input-device. You can try using

    cap = cv2.VideoCapture(1) 
    

    instead of

    cap = cv2.VideoCapture(0) 
    

    & see if the problem still persists.

提交回复
热议问题