OCR on a screenshot
Show older comments
Hello to the community,
I have a database and want to extract the list of what's in the database. The database can only be accessed via a third party software and this software doesn't let me do what I want so I thought I could take a few screenshots and get all what I need using "ocr"
Given it's a screeshot, the image quality is as good as it can be, albeit the resolution is limited, but despite of that the result contains several inaccuracies - see below the original screenshot and the ocr output
I can correct some of the errors by post-processing the text (find/replace sort of thing eg °7o -> %) but others are less obvious
I appreciate this is not the typical application for the ocr function, but is there a way to increase the accuracy? can I, for instance, tell ocr that all the characters are from a given font or something like that? is there a better function to do this?
Here's how I'm pre-processing the image, not much as you can imagine:
screenshot_edit = imresize(screenshot,3);
screenshot_edit = uint8(255*imbinarize(rgb2gray(screenshot_edit)));
and then simply
ocrResults = ocr(screenshot_edit);
SCREENSHOT:

OCR OUTPUT:

thank you very much
Paolo
Accepted Answer
More Answers (1)
Walter Roberson
on 16 Feb 2022
Edited: Walter Roberson
on 22 Feb 2022
0 votes
Categories
Find more on Text Detection and Recognition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!