How to extract text without using OCR in sikuli?

Asked by Nikhilesh

I want to extract test from an image & do some calculations on it & compare the calculated text in other image.Can you plz suggest solution for this? If possible plz provide sample code.

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

I do not really understand your question??

--- How to extract text without using OCR?
--- I want to extract test from an image

The latter is called OCR in Sikuli and is the feature Region.text() (http://sikuli.org/docx/region.html#extracting-text-from-a-region).

But be aware: bug 710586

Revision history for this message
Nikhilesh (nikhileshp) said :
#2

As OCR feature is not reliable so is there any to extract text from an image?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

No, the only solution available for free is Tesseract and this is used in Sikuli.

The only other possibility is to try to select the text using mouse actions and ctrl/cmd-c to get it to the clipboard and then use Env.getClipboard(), but ..
- this cannot be mixed with paste()
- only works, if the text is selectable via mouse actions

Revision history for this message
RaiMan (raimund-hocke) said :
#4

If we are talking about webpages, you might mix Sikuli with Selenium.

Revision history for this message
obaskirt (onur-baskirt) said :
#5

Does Sikuli has xml or html parser? If it has a feature like Watir, sikuli is both good at visual finds and finds which are located in xml/html between tags. As Niklikesh wrote, sometimes we really need to capture an area which is not easy to capture with visually. We have limited features at this point. These are OCR, find and doubleClick and Ctrl-C, and sth similar methods.

Can you help with this problem?

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

To post a message you must log in.