Asif EjazAI engineering / interactive demo← All demos
No language model touches extraction. OpenCV and Tesseract only.

Handwriting OCR that admits what it could not read

Most transcription tools hand you clean text and let you assume it is right. Verbatim does the opposite: it preserves the spelling exactly as written, shows you every preprocessing stage it applied, and marks the words its recogniser was not confident about, so a human knows precisely where to look.

5
preprocessing stages, all visible
0
language models in the extraction path
per word
confidence, never silently dropped
Try it

Upload a page of handwriting and watch the pipeline work

Every stage below is computed on the server from your image. Nothing is pre rendered, and the transcript you get is whatever the engine actually produced, including its mistakes.

Drop an image here

JPEG or PNG, up to 8 MB. A photograph of a handwritten page works best.

Both samples are synthetic, rendered from a handwriting style font. Your upload is processed in memory and never stored.

What the measurement actually says

Better preprocessing made it measurably less wrong, and still unusable

Two changes moved the needle: removing the printed rules of lined paper, which survive thresholding as solid ink and fuse with the letters above them, and upscaling small phone photographs so strokes are more than a pixel wide. Both were adopted because the numbers moved, not because they sounded right.

Removing ruled lines and upscaling cut character error by about a fifth. It is still far too high to trust.

0.0 0.25 0.50 0.75 1.0 character error rate — lower is better Page A 0.98 0.77 Page B 0.82 0.75 Page C 0.91 0.68 baseline pipeline with line removal and upscaling

First party measurement on a private three page corpus of real handwriting, scored against a manual transcription. A character error rate near 0.70 means roughly seven characters in ten are wrong, so the output is not usable as a transcript at any setting.

The failure is the recogniser, not the image

Once the rules are gone and the resolution is adequate, preprocessing has given the engine everything it can. What remains is that Tesseract's models are trained on printed text, and irregular handwriting sits outside that distribution. No threshold tuning closes that gap.

Which makes the confidence signal the product

On those same pages mean confidence sat between 23 and 32, and the engine flagged most of its own output. A pipeline that fails loudly is operationally useful. One that returns fluent, confident, wrong text is not.

The pipeline

Five stages, each one earning its place

Handwriting is irregular in stroke thickness, slant and ink quality, so the image has to be repaired before any recogniser sees it. Each stage below addresses a specific artifact.

01

Resolution normalisation

A phone photograph of a page is often only a few hundred pixels across, which leaves strokes one or two pixels thick and far below what the recogniser expects. Small images are upscaled before anything else runs.

02

Contrast enhancement and denoising

Pressure varies within a single word, so light pencil can sit a few grey levels above the paper. Adaptive histogram equalisation lifts it locally, and a median filter removes scanner grain while preserving the thin stroke edges a blur would destroy.

03

Adaptive thresholding

Pages are photographed under uneven light, so a single global threshold loses whole regions to shadow. A separate threshold is computed per neighbourhood, scaled to the size of the image.

04

Ruled line removal

On lined paper the printed rules survive thresholding as solid ink and fuse with the letters resting on them. Opening the ink mask with a long horizontal kernel isolates the rules, a long vertical kernel isolates the margin, and both are subtracted before recognition.

05

Despeckle and deskew

Residual dots read as punctuation, so anything thinner than a real stroke is opened away. The page tilt is then estimated from the ink distribution and rotated out, because line segmentation degrades quickly once baselines stop being horizontal.

Where this stops, and what comes next

The confidence flags are the routing signal for a hybrid design

Because the engine marks its own uncertain regions, the obvious extension is selective escalation: send only the flagged regions to a vision capable model, keep the rest on the cheap local path, and never let the expensive model rewrite text the traditional engine already read correctly.

Escalate by measurement, not by vibe

The confidence threshold is fitted on a labelled set by sweeping it and watching accuracy below the line against routed volume, rather than picked as a round number. Calibration is rechecked whenever the engine is upgraded.

Guard the fidelity you started with

The merge is positional, so a model asked about one region structurally cannot overwrite another. Any escalated reading that quietly turns a non standard spelling into a dictionary word is quarantined rather than accepted, because preserving what was written is the whole point.