When you upload a photo of handwriting to Vahini, our AI doesn't just "read" the text — it evaluates multiple dimensions of writing quality. Here's what happens behind the scenes.
Step 1: Image Processing
The first challenge is turning a phone photo into something the AI can analyze. This involves:
- Noise reduction — removing shadows, uneven lighting, and paper texture
- Binarization — converting to clear black-on-white
- Deskewing — straightening tilted images
- Line detection — identifying the ruled lines on the page
Even a slightly blurry photo taken at an angle can be processed into a clean, analyzable image.
Step 2: Text Region Detection
The AI identifies where text exists on the page. This isn't just "find dark pixels" — it needs to distinguish between:
- Written text
- Printed text (headers, page numbers)
- Drawings or doodles
- Stains or marks
We focus our analysis only on the child's handwritten content.
Step 3: Line and Word Segmentation
Each line of writing is isolated, then broken down into individual words. This is where spacing analysis begins:
- Line spacing — are lines evenly distributed? Do they drift upward or downward?
- Word spacing — are gaps between words consistent?
- Character spacing — are letters within words evenly spaced?
Step 4: Letter-Level Analysis
This is the core of the assessment. For each letter, the AI evaluates:
Formation accuracy — Does the letter match its expected shape? Are curves smooth? Are straight lines actually straight?
Size consistency — Are similar letters the same height? Do ascenders (b, d, h) and descenders (g, p, y) extend appropriately?
Baseline alignment — Do letters sit on the line or float above/below it?
Slant consistency — Is there a consistent angle across letters, or does it vary randomly?
Step 5: Pattern Recognition
Beyond individual letters, the AI looks for patterns across the entire page:
- Fatigue indicators — does quality degrade toward the bottom of the page?
- Specific letter struggles — which letters are consistently problematic?
- Improvement trends — if multiple pages are available, is the child improving over time?
Step 6: Scoring and Report Generation
All these dimensions are combined into a comprehensive report:
- Overall score — a single number representing general writing quality
- Category scores — detailed breakdown by formation, spacing, alignment, etc.
- Specific findings — "Letter 'd' is frequently reversed" or "Word spacing is inconsistent after the 4th line"
- Exercise recommendations — targeted activities to address identified weaknesses
The Smart Pen Advantage
While image-based analysis is powerful, there are things a camera can't see:
- Writing pressure — how hard is the child pressing?
- Writing speed — are they rushing or deliberate?
- Hesitation patterns — do they pause before certain letters?
- Hand stability — how steady is their hand during writing?
Our Smart Pen captures these invisible signals through built-in sensors (accelerometer, gyroscope, and force sensor), providing a deeper layer of assessment that complements the visual analysis.
Why This Matters
Traditional handwriting assessment is subjective — one teacher might rate a page "good" while another says "needs improvement." AI analysis provides:
Objectivity — consistent scoring criteria across every assessment
Specificity — pinpoints exact issues instead of vague feedback
Actionability — every finding comes with a recommended exercise
Tracking — measurable progress over time
The goal isn't to replace teachers — it's to give them (and parents) data-driven insights that make handwriting improvement faster and more targeted.