def showImage(img,caption='image'): cv2.imshow(caption,img) cv2.waitKey(0) cv2.destroyAllWindows() # Matches a template of cross to detect inner grid lines and then removes them via flood filling