Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

typical n00b error, you forgot to check:

  • if your capture opened: cam.isOpened()
  • if you actually read an image from it: ret==True

so, cv2.cvtColor encountered an empty image, and thew an exception.