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

前端 未结 16 2463
既然无缘
既然无缘 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:38

    Although this is an old thread, I got this error as well and the solution that worked for me is not mentioned here.

    Simply put, in my case the webcam was still in use on the background, as I saw the LED light being on. I have not yet been able to reproduce the issue, so I'm not sure a simple cv2.VideoCapture(0).release() would have solved it. I'll edit this post if and when I have found it out.

    For me a restart of my PC solved the issue, without changing anything to the code.

提交回复
热议问题