How to extract text from an image?? Please Help

Asked by Pankaj Vatsa

Hi All,

I want to extract text from images for automating a software.
The text in the images is also in image format and cannot be selected.

Is there some other way to extract text from image(without selecting and copying to clipboard)

Basically i want to design a script in which sikuli clicks by specifing texts rather than images.

For Example click1("Media")
should click anywhere on screen where Media is written

I opened Paint and wrote "HELLO WORLD" and then in Sikuli i wrote click("HELLO")
it said
that click failed because Sikuli cannot find HELLO on the screen

The same happened even for WORDPAD, where HELLO WORLD was text(and not image as in Paint)
I am using the RC3 build

Any Help would be greatly admired!!!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1
Revision history for this message
Bumbles W (warrenwiz5) said :
#2

I tried finding the linked document - but it looks like the link has broken.

Are there any walkthrough's for how to use a text-grabbing-from-region?

For example, if on google's front page, if I wanted to obtain the words "I'm Feeling Lucky" and then paste them into an excel - how would I do that?

I can use the find function to obtain a region, but I'm not sure how to obtain the text out of the image.

Final note - I know that there are some OCR issues, etc. But I just don't know how to even pull out the text out of the region - I've read through all the documentation on the "everything about Sikuli script" page in regard to regions & text but I couldn't seem to figure it out on my own (with no background in programming).

Please advise.

Revision history for this message
Ashishbajpai (bajpaiashishkumar) said :
#3

well,

My teammate tried scr.find("img.png").text() n we got expected result;

scr stands for screen

Ashish Bajpai

Can you help with this problem?

Provide an answer of your own, or ask Pankaj Vatsa for more information if necessary.

To post a message you must log in.