Live data from Hacker News

Ask HN: Open source OCR library?

news.ycombinator.com

61–70 of 104 posts

Re: Ask HN: Open source OCR library?

#61
post #32

Does it have to be open-source? If free, but not trainable and restricted to Windows apps/phone is good enough, then I recommend the Microsoft OCR library. It gives you very, VERY good results out of the box. An excellent piece of work from Microsoft Research. To test it, see for example https://ocr.a9t9.com/ which uses Microsoft OCR inside. And for comparison, an OCR application with Tesseract inside: It has a drama…

How does the PDF OCR process compare to images? I uploaded a sample PDF with very clear sans-serif text (printed to PDF from a webpage) and there seems to be some odd substitutions. "prohibitecL" instead of "prohibited", "ac" instead of "QC" (as part of an address), random clipping of the first letter in a few lines and random use of a capital i instead of 1.

Overall very good, I'm just wondering if the library is better with image files than PDFs?

Re: Ask HN: Open source OCR library?

#62
post #32

Does it have to be open-source? If free, but not trainable and restricted to Windows apps/phone is good enough, then I recommend the Microsoft OCR library. It gives you very, VERY good results out of the box. An excellent piece of work from Microsoft Research. To test it, see for example https://ocr.a9t9.com/ which uses Microsoft OCR inside. And for comparison, an OCR application with Tesseract inside: It has a drama…

Are you talking about this library from Microsoft: https://www.nuget.org/packages/Microsoft.Windows.Ocr/ ?

Re: Ask HN: Open source OCR library?

#64
(Disclaimer: I work for creatale GmbH)

As you mentioned ocrad.js I assume you search for something in js/nodejs. Many others already recommended tesseract and OpenCV. We have built a library around tesseract for character recognition and OpenCV (and other libraries) for preprocessing, all for node.js/io.js: https://github.com/creatale/node-dv

If you have to recognize forms or other structured images, we also created a higher-level library: https://github.com/creatale/node-fv

Re: Ask HN: Open source OCR library?

#65
post #31

Tesseract is ok, but I gather that a lot of the good work in the last few years on it has remained closed source within Google. If you want to do text extraction, look at things like Stroke Width Transform to extract regions of text before passing them to Tesseract.

Is it possible to extract text from pre-formatted documents? Let's say I have a document issued by the government, and I am only interested in the fields that have been filled. Could I process such a document fully automated using Tesseract? Maybe some image pre-processing would be needed?

(Disclaimer: I work for creatale GmbH)

We open-sourced the library that we use for exactly that purpose: https://github.com/creatale/node-fv

Re: Ask HN: Open source OCR library?

#66
post #32

Does it have to be open-source? If free, but not trainable and restricted to Windows apps/phone is good enough, then I recommend the Microsoft OCR library. It gives you very, VERY good results out of the box. An excellent piece of work from Microsoft Research. To test it, see for example https://ocr.a9t9.com/ which uses Microsoft OCR inside. And for comparison, an OCR application with Tesseract inside: It has a drama…

That https://ocr.a9t9.com/ link worked pretty impressively. I did a screen shot and uploaded it to to test it out. Nice.

Re: Ask HN: Open source OCR library?

#67

Tesseract is ok, but I gather that a lot of the good work in the last few years on it has remained closed source within Google. If you want to do text extraction, look at things like Stroke Width Transform to extract regions of text before passing them to Tesseract.

If you are using OpenCV and tesseract, you might have a look at Scene Text Detection in OpenCV 3. It's in the text module within OpenCV_contrib [0].

There are samples here [1] and here [2] to get you started. The paper is here: [3]

---

[0] http://docs.opencv.org/3.0-beta/modules/text/doc/erfilter.ht...

[1] https://github.com/Itseez/opencv_contrib/blob/master/modules...

[2] https://github.com/Itseez/opencv_contrib/blob/master/modules...

[3] http://cmp.felk.cvut.cz/~neumalu1/neumann-cvpr2012.pdf

Re: Ask HN: Open source OCR library?

#69
post #44

Earlier quoted context omitted.

Finereader engine Abbyy for Linux looks fine, but I can't find price data, is it <10k/year? One time license?

Abbyy, and most good commercial OCR, charge a runtime royalty based on the number of cores you are deploying to. Depends on volume.

And they limit you to scanned pages per year on the corporate/server offerings. Doubly-so for all their dev/api license options.

And the kicker: You can't buy those licenses from them directly. They put you in contact with some randome monopoly local distributor that usually has mandatory "training" charges.

Messy, and I'm planning on staying away from that with a ten-foot pole.

Re: Ask HN: Open source OCR library?

#70

I was actually looking in to Tesseract yesterday, so this post coincides nicely. I have a hobby project where I scrape instagram photos, and I actually only want to end up with photos with actual people in them. There are a lot of images being posted with motivational texts etc that I want to automatically filter out. So far I've already built a binary that scans images and spits out the dominant color percentage, if…

For the motivational posters specifically, you might want to check out a Perceptual Hash type algorithm. Convert the image to a 64px square low-depth grayscale (4b?) and most of them should look more or less the same to PHash. Maybe you then classify them into clusters based on hash distance or something.

I also like your dominant-color thing. If you have a couple approaches that each make sense, you can use them as an ensemble - the more classifiers that don't like something, the more likely it's junk.

Post reply on HN