Jump to content

Creating a workflow to recognise text in an image


Recommended Posts

Posted (edited)

I had an idea of making this workflow for some time now. I want to have a screenshot utility that will take a screenshot created by a user, it will recognise the text in this image and put the text into the clipboard of the user. 

 

So if I was to screenshot this line from wikipedia for example : 

 

Wf9rXgL.png 

 

It would scan it, and put a text representation of this image into my clipboard. So in my clipboard after the scan, I will have this : 

 

wHmr9rh.png 

 

I found a library that seems to do what I want : https://github.com/otiai10/gosseract

 

However I am not quite sure how to connect all these pieces. I can make a screenshot by issuing a screencapture -ci command. Then perhaps I need to save this image to some temporary location and then run this or some other OCR program on it and get the text I need?

 

This workflow is specifically useful for me for grabbing text from places where text is non selectable. Like for example, I wish I could screenshot this image : 

 

 

dSFLWEg.png 

 

And get the text from this image into my clipboard.

 

Thank you for any help.

 

 

Edited by nikivi
  • 11 months later...
  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...