Dot matrix OCR, tested with free readers
Tesseract read 5 of our 240 drawn dot matrix lines exactly, and 130 after a blur and a black or white cut.
Why dots break OCR
Most OCR models learn from solid strokes. A dot matrix letter is a grid of loose dots, often 5 by 7, from an impact printer, an inkjet coder or an LED sign.
The test: four dot sizes
| Text | 20 made-up lines |
| Dot sizes | Dot width over spacing: 1.0, 0.8, 0.6, 0.45 |
| Fonts | Doto at 2 weights; Arial as the control |
| Looks | Clean, inkjet on a box, LED sign |
| Readers | Tesseract, Apple Vision, RapidOCR |
Without a blur, Tesseract read almost no dots
| Text | Tesseract | + blur | Apple | RapidOCR |
|---|---|---|---|---|
| Grid 1.0 | 3 | 34 | 40 | 51 |
| Grid 0.8 | 2 | 36 | 39 | 35 |
| Grid 0.6 | 0 | 34 | 13 | 24 |
| Grid 0.45 | 0 | 26 | 2 | 0 |
| Doto 900 | 1 | 29 | 23 | 29 |
| Doto 400 | 0 | 20 | 15 | 6 |
| Arial | 60 | 54 | 60 | 60 |
The blur led at the two smallest dot sizes; RapidOCR led with dots that touch.
Sharp dots were hardest for Apple and RapidOCR
| Reader | Clean | Inkjet on a box | LED sign |
|---|---|---|---|
| Tesseract | 2 | 1 | 2 |
| + blur | 52 | 30 | 48 |
| Apple | 25 | 38 | 31 |
| RapidOCR | 17 | 44 | 49 |
The drawn photo blur and LED glow seem to join the dots a little. On inkjet, where dots also wander, both beat the blur.
The fix: join the dots first
Blur by half the dot pitch, then cut to black and white. In Python (Pillow and numpy), saved as join.py:
import sys
import numpy as np
from PIL import Image, ImageFilter, ImageOps
PITCH = 6 # pixels from one dot center to the next
im = Image.open(sys.argv[1]).convert("L")
if np.mean(im) < 128:
im = ImageOps.invert(im)
a = np.asarray(im.filter(ImageFilter.GaussianBlur(PITCH / 2)))
h = np.bincount(a.ravel(), minlength=256).astype(float)
w, m = h.cumsum(), (h * np.arange(256)).cumsum()
with np.errstate(all="ignore"):
t = np.nanargmax(w * (w[-1] - w) * (m / w - (m[-1] - m) / (w[-1] - w)) ** 2)
Image.fromarray(np.where(a > t, 255, 0).astype(np.uint8)).save("joined.png")
Then read the line:
python3 join.py label.png
tesseract joined.png - --psm 7
Blur only the dot text
Set PITCH to your dot spacing in pixels. I tested only a 6 px pitch and did not tune the blur.
- Arial went from 60 to 54 of 60 lines with the blur.
- A close (MinFilter, then MaxFilter) spared Arial but helped dots far less: 22 of 240 grid lines.
LED signs: light on dark
Light on dark alone is not the problem: Tesseract read 20 of 20 Arial LED lines. Tesseract's docs ask for dark on light, so the script turns it over.
At the smallest dots, RapidOCR and Apple read 0 of 20 LED lines; the blur fix, 13.
Our Actor did well on inkjet, not LED
PDF OCR to Markdown, our Apify Actor, hands pages Tesseract reads badly to RapidOCR. On 15 grid images at dot size 0.6, a small sample:
- Inkjet: 7 of 10 exact, more than any other way here (5).
- LED: 1 of 5 exact, two empty; the blur fix read 4.
- Scanned pages: $0.006 each. Digital pages: free. Plus a $0.00005 start fee a run at the default 1 GB.
- On Apify's free plan, it stops at 20 pages a run and 50 a month.
What I did not test
- Real receipts from impact printers, codes from inkjet coders, or LED signs: a script drew every line here.
- Other fonts, dot pitches, blur sizes and OCR engines, the dot matrix model with --psm 13, RapidOCR at its defaults on all images, or more than 20 lines.
How I tested it
- Text: 20 made-up lines of our own: inkjet date and lot codes, receipt lines, serial numbers and times, short sign words. Cut from 30 for time, before any read was scored.
- Images: capitals 42 px tall, dots on a 6 px pitch. The 5 by 7 grid at 4 dot sizes, Doto at weights 900 and 400, and Arial, each clean, drawn to look like an inkjet photo, and drawn as an LED sign: 420 images.
- Inkjet: grid dots moved and resized at random, brown cardboard, tilt, blur, noise and JPEG. LED: amber or green dots with a glow, on dark.
- Score: spaces removed on both sides. Exact means the read equals the line. Characters right is 1 minus the edit distance over the line's length.
- Blur: the script above, a Gaussian blur of 3 px and an Otsu cut. Close: Pillow MinFilter 5, then MaxFilter 5. Both ran on every image, Arial too. Then Tesseract 5.5.4, eng, --psm 7.
- RapidOCR 3.10.0 ran with our Actor's text finder size, longest side 960 px, not its default. The default blows a 96 px line up 7.7 times: on a 20-image dry run it read 5 exactly and found no text in 10.
- Apple Vision: accurate mode, en-US, language correction off, on macOS 26.6.
- The Actor check: its code at commit c885eea3, run on our Mac, not on Apify, with its default settings, on 10 inkjet and 5 LED images at dot size 0.6. It took 1.7 to 29.8 seconds an image.
- The script above wrote the same image as the bench's blur for all 420 images, byte for byte, and gave the same read on 10 of 10 checked.
- Scripts and results stay in our private repo, in research/bench/dot-matrix-ocr-2026-11-24/.
Sources
- The 5 by 7 letters: glcdfont.c from the Adafruit GFX Library (BSD license)
- Doto on Google Fonts (OFL 1.1)
- Improving the quality of the output, in the Tesseract docs, and Tesseract (Apache-2.0)
- dotmatrix_number.traineddata from zhangnatha/ocr_barcode_recognize (BSD-3-Clause)
- RapidOCR (Apache-2.0)
- Apple Vision ships with macOS. It is not open source; Apple's SDK terms apply.
- We make the Apify Actor, and none of the other tools here.
Questions people ask
Can Tesseract read dot matrix text?
Not as it is. On our 240 drawn grid lines, Tesseract read 5 exactly. After a blur by half the dot pitch and a black or white cut, it read 130, with 91.6% of characters right.
What is the best free OCR for dot matrix print?
It depends on the gaps. On our drawn lines with dots that touch, RapidOCR read 51 of 60. At the smallest dots, Tesseract after the blur read 26 of 60, Apple Vision 2 and RapidOCR 0.
How do I read inkjet date and lot codes on boxes?
On our drawn inkjet images, RapidOCR read 44 of 80 grid lines exactly, Apple Vision 38, and Tesseract after the blur 30. Our Actor, which falls back to RapidOCR, read 7 of 10 at dot size 0.6, a small sample.
Is there a dot matrix font or model for Tesseract?
Doto is a free dot font (OFL 1.1). For Tesseract I found one licensed model, dotmatrix_number (BSD-3-Clause), tuned from eng for inkjet digits. It read 6 of 240 grid lines exactly, against 5 for eng. Its README suggests --psm 13, which I did not test.
Related guides
- Seven segment OCR, tested: Tesseract and ssocr on 47 displays
- Scoreboard OCR, tested: LED boards and TV score bars
- OCR-A, OCR-B and MICR fonts: free downloads, tested by OCR
- Receipt OCR in Python: Tesseract 33%, RapidOCR 84%
- Image preprocessing for OCR: what helps Tesseract, tested
- Best DPI for OCR, tested from 72 to 600 dpi