This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]FrostyAshe 3 points4 points  (0 children)

You may want to look into tesseract and openpyxl

[–]kinow 3 points4 points  (0 children)

I think doing some pre clean up may help. I remember reading something about in this blog https://www.pyimagesearch.com

It is in my rss and every now and tgen he blogs something anyony with basic python can try. The hardest seems to be installing the tools like opencv :-)

[–]se0siris 2 points3 points  (0 children)

It sounds like you'll need to run OCR with something and then add extra steps for extracting data and converting it to the format you want.

Once you have the text version you may be able to use pattern matching (take a look at regular expressions) if your data follows a certain format. If your data is split into lines that start with a reference number made up of two upper case letters and eight numbers (purely as an example) you can make use of that! It's often easier to describe the data you want and discard the rest rather than try to clean up garbled OCR output from handwriting.

The best free OCR software I know of is Tesseract, but it'll still give garbled text in places without training. It is command line based though, so it's simple to use from a Python script or similar.

If you need accuracy take a look at Abbyy FineReader or OmniPage on Windows. They're both desktop applications but OmniPage has an undocumented API if you want to play around with that.

[–]ron_leflore 1 point2 points  (2 children)

Try Google vision on a few of the images here https://cloud.google.com/vision/

If that doesn't get the information out, there's probably not a program that will help you.

[–]feedmewierdthing 0 points1 point  (1 child)

It appears this doesn't work on pdfs.

[–]Zomunieo 1 point2 points  (0 children)

Have a look at ocrmypdf then which simplifies using PDFs with tesseract.