# Revision history [back]

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 ...

 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 ...

 if image==None: