How can I split an image into rectangles? I have a labelled form to which people will add their name and a series of numbers. They will then take a picture of the form. Like so:



I can get decent results by simply sending this to AWS Rekognition



but I feel like it would do even better if I was able to split the image into parts before sending it to the OCR API. What techniques can I use to accomplish this?

I can modify the form for better results if that helps. Maybe make borders more or less dark? Whatever is needed.
AWS Rekognition works very well for detecting typewritten text but not so well for detecting hand written symbols. You can see this is true in your example. What I would do is detect all the boxes associated with the words Problem. Then you can extract a box relative to the position of this word. Then you will have extracted the hand written numbers in each box.