IIT Kanpur, India
AI That Sloves Handwritten Math

Jan–Mar 2020
5 min read
What if you could photograph a handwritten equation and get back both clean, publishable code and the answer? This project builds exactly that — reading messy handwritten math, converting it into LaTeX, and solving it.

The pipeline started with character segmentation — using contour detection to draw bounding rectangles around individual handwritten characters — before each isolated character was passed through a CNN for recognition, built using TensorFlow placeholders. Recognizing characters alone wasn't enough — the system also needed to understand structure, not just symbols. I built a structural analysis stage that clustered semantically related symbols into an expression tree representing the actual equation, then wrote a lexer and parser to recurse through that tree — generating correct LaTeX source and solving the expression as final output.


