New question #665568 on Sikuli:

I was comparing and researching a solution for a text grab from the screen.  I 
know, from reading the conversations here on launchpad that ocr is a hit or 
miss thing.  I captured a png from my screen using the mac screen capture tool, 
and also captured the same area using sikuli.  Looking at the results, and the 
tesseract results, the difference is noticeable.  I tried to look through the 
api code and the robot hooks, and came to the conclusion that maybe the robot 
library is the limitation, or that i just can't find a capture implementation 
that might suffice.  below is text from a terminal session comparing the two 
screen captures of the same image.

I'm happy to poke at this further, but do you have any guidance on where(either 
in the capture interface or the robot library) to look at?  I did attempt a 
patch that i thought might achieve a higher resolution capture, but was unable 
to test because I broke your code in too many other places attempting it (I 
mucked with abstractions but didn't update everywhere).

the image captured from the mac is a bit larger-
skexis:imagecaptures.sikuli$ ls -lh 013689.png maccapt.png 
-rw-r--r--  1 mb  staff    29K Mar 13 21:52 013689.png
-rw-r--r--@ 1 mb  staff    43K Mar 13 21:55 maccapt.png

imagemagick shows that the pixel count is significantly higher in the mac 
capture (haven't tested this on linux or windows)
skexis:imagecaptures.sikuli$ magick identify 013689.png maccapt.png 
013689.png PNG 236x50 236x50+0+0 8-bit sRGB 29618B 0.000u 0:00.009
maccapt.png PNG 476x102 476x102+0+0 8-bit sRGB 43778B 0.000u 0:00.000

tesseract has hugely different degrees of success on the two images.  Both of 
these are without creating any training info for tesseract to use on the odd 
font that the capture uses.

skexis:imagecaptures.sikuli$ tesseract 013689.png stdout
Warning. Invalid resolution 0 dpi. Using 70 instead.
YEAR < AKHzrxao 652AM
MEROE Dzsm 7350 76961

skexis:imagecaptures.sikuli$ tesseract maccapt.png stdout
YEAR 1. AKHET I-éo. 6:55AM
MEROE DESERT: 380. 6961

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to