I\'ve been working on a sudoku solver and to divide the grid into squares I use contours.
def squares(img): gray =