The 4 Stages of Document OCR
When you feed an image of a marksheet, deed, or voter slip into an OCR engine, the software follows a multi-stage pipeline:
1. Image Pre-processing (Binarization & Contrast Enhancement)
Scanned paper often contains background grain, yellowing, uneven lighting shadows, or tilted scan angles. The OCR engine first converts the image into high-contrast grayscale, applies thresholding (separating dark text pixels from light background pixels), and levels out slanted lines.
2. Layout & Reading Order Segmentation
Documents rarely consist of simple single-column text. Government forms, land khatians, and voter lists contain multi-column tables and box grids. The engine segments the page into bounding zones, ensuring text from Column 1 is not accidentally read into the middle of Column 2.
3. Character Recognition & Neural Vision
Traditional OCR engines (such as Tesseract) match character shapes against statistical dictionaries. Modern multimodal AI engines (such as Google Gemini) inspect whole visual lines simultaneously, using contextual language comprehension to decipher degraded or cursive letter shapes based on surrounding words.
4. Coordinate Positioning & Output Formatting
Rather than merely dumping raw plain text into a notepad, document OCR engines record the spatial coordinates [ymin, xmin, ymax, xmax] of every word on the page. This allows the software to superimpose an invisible text layer directly on top of the original document.
Try OCR on Your Scanned Documents
Scan multi-column Bengali and English records into searchable PDFs.
Local In-Browser OCR vs. Cloud AI OCR: How They Compare
Inside Pragati Telecom's portal, we utilize two distinct OCR engines depending on the requirements of the tool:
| Feature | Local OCR (Tesseract.js) | Cloud AI OCR (Google Gemini API) |
|---|---|---|
| Where It Runs | 100% inside your browser RAM | Pragati Telecom Cloudflare Worker API |
| Privacy & Data Flow | Zero network transmission | Secure encrypted in-memory processing |
| Internet Requirement | Works offline after initial load | Requires active internet connection |
| Best Used For | Single-line corrections & text boxes in PDF Editor | Multi-column Bengali voter lists & deeds in Searchable PDF |
| API Key Needed? | No API key needed | No user key needed (managed on server) |
Why Regional Bengali OCR Requires Specialized Handling
Recognizing Indian regional scripts like Bengali (বাংলা) presents unique computational hurdles compared to standard English:
- Headline (মাত্রা - Matra): Continuous horizontal top bars connect multiple characters together in a word, making simple individual character cutting difficult.
- Conjuncts & Vowel Signs (যুক্তাক্ষর ও কার/ফলা): Modifier symbols can sit above (ৈ, ৌ), below (ু, ূ, ৃ), before (ি, ে), or wrap around (ো, ৌ) the base consonant.
- Complex Character Density: Vision models must identify subtleties between similar glyphs (e.g. 'খ' vs 'থ', or 'ড়' vs 'ঢ়').
Common OCR Errors & Why Human Review Is Mandatory
OCR output should always be reviewed before using recognized text for critical legal or official submissions:
- Number Confusions: Faded zero '0' and capital 'O', or number '1' and lowercase 'l' / capital 'I'.
- Specks and Stamp Marks: Rubber stamps, staples, or punch holes on paper can occasionally be misread as punctuation marks (like dots, commas, or dashes).
- Low DPI Scans: Images below 150 DPI lack sufficient pixel contrast for reliable glyph edge detection.
🔒 Privacy Notice
Data Handling Transparency: Local OCR in the PDF Editor runs 100% on your device. When using Google Gemini OCR in Searchable PDF Maker, data is transmitted directly from your browser to Google's API endpoint over HTTPS. Pragati Telecom never stores or logs your document contents.