Successful methods for optical character recognition? Alright, I want to write a mobile app that lets you take a photo of your equation, detects the equation, transforms it from pixels to text and then solves if it's possible.

Right now, I am doing the part where I receive a photo (2D array of pixels) and what to output a resized part of this photo (the part has a rectangular shape) that just contains the equation and some pixels around it.

Basically, I need a model that takes a 2D array and returns a resized version of it.

Since I am new to AI, I don't know what techniques have been successful in optical character recognition.

Any suggestions?
This is not meant to be a direct answer, as OCR is not an area I have experience in, but I want to present a deeper problem, that of mathematical notation.

Mathematics has "exploded" in the last few centuries, and notation is not standard across various sub-fields.  Check out this question on notational change with integrals. In some cases, individual sub-fields have alternate forms of notation.

My suspicion is that this task will be enormously difficult without a great deal of human guidance, so I'd point you towards AI methods that utilize "human-assisted machine learning".