Isolate individual contours and loop over rotations and square sizes

Getting the part of the image that matches with the largest overlapping
square is not implemented yet