/ocr-in-sed

An attempt to implement optical character recognition in sed.

Primary Languagesed

ocr-in-sed

Optical character recognition (OCR) in sed. Reimplementation of Kopczynski's OCR C one-liner.

Example:

cat examples/9.txt | ./ocr.sed
# Expected output: 9.

Try other examples/*.txt files or "draw" your own (simple "ascii-art" matrices of x'es and whitespaces).

The algorithm finds a topological invariant known as the Euler number and uses it to tell the numbers apart. Currently, it is able to recognize 8, 9, 10, and 11. So many numbers...

See references below and the source code (ocr.sed) for implementation details and related information.

References: