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

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

    I use ssh to connect to remote server and have python code execute cv2.VideoCapture(0) to capture remote webcam, then encounter this error message:

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

    Finally, I have to grant access to /dev/video0 (which is my webcam device) with my user account and the error message was gone. Use usermod to add user into group video

    usermod -a -G video user
    

提交回复
热议问题