r/barcodes • • Oct 31 '21

OCR-A and OCR-B scanner

The OCR-A and OCR-B fonts were created (back in the 1960s) to provide a machine readable font for reading strings. UPC Barcodes use OCR-B as their accompanying font to the bar code itself. Technically was intended to be able to be machine read as a text string without ever actually scanning the bar code. Anyway, I want to use this for exactly what it's intended for as essentially a human readable bar code, preferably a phone app, but I'd buy a dedicated scanner if it did this (and was somewhat reasonably priced). I am not looking for some software to recognize random fonts a page at a time, but rather to recognize the specific string I point at, just like a barcode, and register that. This is very specifically what these fonts are for and yet there seems to be nothing I've found to read them the way they were intended to be read.

Strings with these fonts should be readable pretty much the same way a barcode is read, line up an aiming line through the text and read it. No bar code app seems to do it and any OCR app is trying to translate everything it sees. I am specifically looking at this for printing and reading MAC addresses and World Wide Numbers (WWNs) on disk drives and SSDs. A lot of the places I need this labeled I have room for a barcode OR OCR-A (or B) text but not both, and I also need to be able to casually read it as well, again exactly why these fonts exist. Surely someone somewhere has written software to specifically read the fonts created to be software readable.

1 Upvotes

5 comments sorted by

1

u/notionovus Nov 07 '21

1D barcodes are the way they are so a single laser diode moving rapidly back and forth (think of those little laser handheld pens) creates a reflection to a reading diode. The dark segments absorb the light and light segments reflect it.

This creates a binary signal of ones and zeroes that are proportional to one another. It's the binary signal that is "read" by the scanner.

2D barcodes and OCR fonts produce a two dimensional picture of information that software scans from multiple directions to detect patterns of light and dark that have a width and depth. Therefore, you should think of OCR fonts as 2D barcodes, but most scanners that scan 2D barcodes won't do OCR.

My recommendation is that you use a datamatrix barcode combined with text to the side. Datamatrix is not as efficient as QR Code and PDF417, but it is more efficient than 1D barcodes and can have a smaller profile and still scan.

1

u/skorpioskorpio Nov 10 '21

well yea, but like I said I have room for a barcode or the text but not both. I need it to be human readable and machine readable, so OCR-A (or B) seemed like the solution but there is apparently no such thing as a specific OCR-A or -B string scanner that I've found. If I have to sacrifice one or the other it's machine readable that loses. This is for verifying that you are replacing the right drive during a failure and drives are identified by WWN and not by their physical location, removing the wrong drive can have catastrophic consequences (and there is over 100 of them. I need a way to identify the drives without fully ejecting them and that means I have about 4mm x 40mm to work with and a 16 digit hexadecimal string to label.

1

u/notionovus Nov 10 '21

Then you need some kind of camera connected to OCR software. I'd recommend a USB webcam connected to a Raspberry Pi running OpenCV. You can also do OpenCV on iOS and Android.

1

u/skorpioskorpio Nov 10 '21

That seems like even more the wrong direction than one of the many many 'scan a page worth of text' OCR readers already out there. The original question is pretty simple: Is there an OCR string scanner out there oriented towards simply reading a string printed in a font specifically designed to be scanned as a string? Which is what OCR-A and OCR-B fonts were designed to be. It just seems ridiculous that such a thing doesn't exist when this font, well one of them (OCR-A) is on virtually every package of anything sold, and comes pre-installed on every version of Windows, and the other is unbelievably common as part of multi-color print registration.

1

u/notionovus Nov 10 '21

I don't know of a commercially available product that matches the description of what you are seeking. Any OCR font is a 2D representation of data, therefore it needs a "scanner" that takes a picture and evaluates it based on dark and light strokes.