2

I receive a lot of screenshots during my daily work.

Most of them contain numbers which I need to copy+paste.

Is there a magic way to copy+paste numbers from images?

I use thunderbird and firefox to look at the screenshots.

This is not about "best OCR solution". Tesseract would be good enough. This question is about simple grandma compatible integration of OCR into the desktop. I don't want bricks to play with, I want a daily and easy to use solution.

I have seen this on ms-windows in the year 2001 (18 years ago). But I can't remember how this tool was called.

guettli
  • 1,777
  • @mikewhatever this is not about "best OCR solution". Tesseract would be good enough. This question is about simple grandma compatible integration of OCR into the desktop. – guettli Jan 04 '19 at 12:55
  • You can use the regional screenshot hotkey (Shift+PrintScreen) to take a screenshot, this by default will put the screenshot in ~/Pictures folder. You can then map a global hotkey to run a script that runs tesseract on the most recent file in ~/Pictures and puts the results in clipboard or trigger paste action. Initial installation may be tricky, but it will be grandma proof once everything is setup. Let me know if you're interested with this type of solution, I can expand further on the details as a proper answer. – Lie Ryan Jan 04 '19 at 14:46
  • @LieRyan I want a simple working and easy to use solution. I don't care for the implementation. I want it to be available not just for me, but for everyone who uses the ubuntu desktop. I would even pay for it. – guettli Jan 04 '19 at 15:02
  • @guettly: it took me about 20 minutes to whip up and test this script (writing the install instruction takes longer than writing the script). Detailed instruction is on the linked page as I can't post to a closed question. It turns out to be much simpler than what I was thinking in my previous comment. – Lie Ryan Jan 04 '19 at 19:05
  • @LieRyan thank you very much for your effort. If you look at the gist at the birds eyes view: There were several script like this before, and there will be several script like this after today. But the overall desktop experience for new comers who have a vanilla ubunt... Will this change? – guettli Jan 07 '19 at 09:32
  • CLI commands rarely change, the part of the Gist that's most likely to change here is the guide for setting a global shortcut. The rest is unlikely to change as long as Ubuntu remains using GNOME-based desktop environment (all versions of Unity are GNOME-based DE as well). If you need a script that's likely to survive DE changes, you'll want to replace gnome-screenshot with Imagemagick's import. – Lie Ryan Jan 07 '19 at 10:38

1 Answers1

1

Nope.

From a PDF you can as this has an extra layer that allows copy-paste of the content. But screenshots (jpeg, gif etc) do not have such features. Those contains pixels that look like digits and letters but are not.

You will need tools to extract numbers. See for instance How can I extract text from images? for list on OCR tools. None of these are easy, none are 100% perfect, and all will work on saved images and it will not work from inside a browser.

Rinzwind
  • 299,756