Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your image was never read (imread() returns None silently on failure).

please make it a habit to check EVERY imread() call like:

im = cv2.imread(somepath)
if not im:
       # fail, you can't go on ! check the path, and try again

your image was never read (imread() returns None silently on failure).failure, and you will get errors in the next lines, trying to process an invalid image).

please make it a habit to check EVERY imread() call like:

im = cv2.imread(somepath)
if not im:
       # fail, you can't go on ! check the path, and try again