Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

problem is here:

 image = cv2.imread(image_path)

like any other python noob, you NEVER check, if the image was actually loaded, and then you get errors in the NEXT lines ...

please add a check here:

 if image==None:
    print("invalid image ! ", filename)
    return

problem is here:

 image = cv2.imread(image_path)

like any other python noob, you NEVER check, if the image was actually loaded, and then you get errors in the NEXT lines ...

please add a check here:

 if image==None:
    print("invalid image ! ", filename)
    return
return None, None