Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

this is the most common error for python users, your io failed (camera did not open, image path wrong, etc) and you DID NOT CHECK, so you get problems in the NEXT lines with invalid images.

again, you HAVE to check if imread() returns None , the ret val from capture.read(), and all that.

this is the most common error for python users, your io failed (camera did not open, image path wrong, etc) and you DID NOT CHECK, so you get problems in the NEXT lines with invalid images.

again, you HAVE to check if imread() returns None , the ret val from capture.read(), and all that.that, opencv won't throw any exceptions here, and it's your responsibility to check.