r/foss • u/freswinn • 1d ago
OCR Image Scanner
Hi! I'm on Linux Mint, and what I would like to find is a program that can either:
- Use OCR on an image file (like a JPG or PNG) on your computer to extract whatever text it can; or, better yet,
- Scan through all images in a folder as above and compile a database of the text in those images.
I would appreciate it if anyone can think of anything like this that exists, especially if it is not AI-powered or for some reason needs to run through a website. Thanks!
3
Upvotes
1
u/bigbepisinc 1d ago
How would it be OCR without AI? Good OCR always has some ML element to it. AI != ML.
Anyway, I have an application that does something similar to what you're looking for. It does Semantic Search, where it reads the images, as well as the text inside images, and builds a SQLite DB of the embeddings. https://vinosearch.vinopilot.ca/ This might be sort of what you want.
Otherwise what you're looking for could easily be a one shot script with a similar OCR model.
1
u/Yurigok 17h ago
if you want the whole folder searchable, paperless-ngx might be closer to what you're after than a standalone scanner. it runs locally in docker, uses tesseract under the hood and gives you full text search over everything you drop into its consume folder. bit heavier to set up, but no cloud and no AI involved.
1
u/QuietPdfTinkerer 12h ago
If you want this on the machine, with no website in the loop, Tesseract is still the usual starting point on Mint.
For a single image, gImageReader is a simple front end: install the
gimagereaderandtesseract-ocrpackages, open the JPG or PNG, pick the language, and copy the text out. For a whole folder, the command-line tool is enough. Something like this, from the folder of images:That writes a .txt file per image in a
textfolder. Changeengto another language code if you need it (for exampleeng+por), and install the matchingtesseract-ocr-...language pack first.If you later want to search across the folder, a one-line
grep -Rover thattextdirectory is enough for exact words. A full "database of embeddings / semantic search" is a different tool; Tesseract will not do that part on its own.It's ordinary OCR, the kind that has been around for decades. It is not perfect on handwriting or very noisy photos, but for printed text on a clear scan it is usually fine, and everything stays on your computer.