Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-26 Thread Launchpad Janitor
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-11 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Answered => Open

Niklas Jørgensen is still having a problem:
I guess i coule make a forloop that uses Key.PAGE_DOWN and waits for the
img "end_of_dropdown" is found, that's what i did to break the loop.

but now i tried avoiding OCR and are working with an API that sends the
data to the script and work with fixed regions with that!

lmk if there is some smart was with that "last entry in the menu" idea
:) - and thanks for your time again.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-09 Thread Manfred Hampl
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Open => Answered

Manfred Hampl proposed the following answer:
I did not mean reconfiguring the whole application for all users, but
just the display part on your computer. In any case, from your answer it
seems that this is not possible.

Do you really need to (correctly) read the contents of that line?
Eventually it is possible to select "the last entry in the menu" without the 
need to decipher the text?

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-09 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Answered => Open

Niklas Jørgensen is still having a problem:
Hey Manfred, thanks for the answer!

It is a part of a dropdown menu in a program - rightclicking will just
choose that option. Since the program is being used by a big
coorporation, i am not able to change the configuration of the program
itself, because that would change it for everyone in the company.
Zooming in doesnt seem to be an option the program offers, maybe the old
"loop" windows function can help out here somehow? :D

I tried working with resize(x) for some time, but this was most optimal
at "3" and as far as i know, this is the default value anyway.

Maybe i just have to somehow try to avoid using OCR for this task

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-09 Thread Manfred Hampl
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Open => Answered

Manfred Hampl proposed the following answer:
Just for diagnostic purposes:
Is the "[SJ/SJ] (01-01-2009-31-12-2099)" text the output of a program running 
locally, or is that part of a web page?

If it is a web page, what is the format for displaying "[SJ/SJ] 
(01-01-2009-31-12-2099)" - is it an image or text?
Or, if you do a right click on the "[SJ/SJ] (01-01-2009-31-12-2099)" text, what 
do you get offered in the pop-up window (e.g save image as ...)?

Is there any possibility to increase the display size of that part of
the screen or changing the configuration of the program used (e.g. like
increasing display size of the web page to 150%)?

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-09 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Answered => Open

Niklas Jørgensen is still having a problem:
I did consider the clipBoard operation, but the problem is that the
program that im working in (the .txt file was just for testing) i am not
able to highlight any text :(

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-05 Thread abuzer stream
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Open => Answered

abuzer stream proposed the following answer:
If you are trying to read a text that you can select, after selecting it
with doubleClick(), you can assign the datayo you copied with ctrl+c
->(type( Key.CTRL+'c')) to your variable with Env.getClipboard.


Env.getClipboard()
Get the content of the clipboard if it is text, otherwise an empty string.

NOTE: Be careful, when using Env.getClipboard() together with paste(),
since paste internally uses the clipboard to transfer text to other
applications, the clipboard will contain what you just pasted.
Therefore, if you need the content of the clipboard, you should call
Env.getClipboard() before using paste().

Tipp: When the clipboard content was copied from a web page that mixes
images and text, you should be aware, that there may be whitespace
characters around and inside your text, that you might not have
expected. In this


text = Env.getClipboard()

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-10-02 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Expired => Open

Niklas Jørgensen is still having a problem:
Changed to "expired" so posting just to "bump"

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-09-28 Thread Launchpad Janitor
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-09-12 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Niklas Jørgensen gave more information on the question:
Spamming my own topic, sorry guys :D

Using:

m = findtext(SomeString)
m.highlight(3)

wont work if the text is too small or too thin it seems. Only with some
specific inputs -

I tried just adding some text in a notepad:

Hej med diiig
Hallo hvordan går det
My Veteran/161'
yoyo
evqw
777
01-01
wqe
[SJ/SJ] (01-01-2009-31-12-2099)

some lines usefull for my work and some just playing around, but the
result from:

print(the_region.text()) also gave my the output:

Hej med diiig
Hallo hvordan går det
Ny: YVeteran/161”
yoyo
evgw
777
01—01
wge
[S1/SJ] (61—01—2009—31—12—2099)

(Ignore the long dashes, I have dealt with them with a simple
.replace("—", "-"))

So there's clearly alot of outliers.. Can i somehow change the font or
make the program zoom on the text or something to make it more
consistent? - My last post for now, i promise! :)

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-09-12 Thread Niklas Jørgensen
Question #707899 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/707899

Niklas Jørgensen gave more information on the question:
Sikulix version: 2.0.5
Java: version 17

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #707899]: OCR not recognizing simple text

2023-09-12 Thread Niklas Jørgensen
New question #707899 on SikuliX:
https://answers.launchpad.net/sikuli/+question/707899

Hey all!

Im having some trouble recognizing some simple text using the inbuilt tesseract 
OCR in Sikulix. It had a bit of trouble recognizing everything but when I set 
the language to danish (which is the language i need to use) it helped alot but 
it keeps mixing SJ/SJ for 5351 or 5531 or something. I've been playing with the 
OCR.globalOptions for multiple hours without any change in the outcome, 
hlp! The text in the image is -

Text: https://ibb.co/ZhmZGxJ

Is there any way it can be calibrated in a way where it can actually read the 
SJ/SJ? - are the letters too small or thin maybe?


This is the code that I have in this test project.

Settings.OcrTextSearch = True
Settings.OcrTextRead = True
Settings.OcrLanguage = "dan"

my_options = 
OCR.Options().oem(OCR.OEM.TESSERACT_ONLY).configs("digits").language("dan")

print(OCR.globalOptions())

print(my_options)


my_region = Region(877,548,167,11)


print(OCR.readWord(my_region,my_options))


print(my_region.text())

Output:

53511 01-01-2009-31-12-2099
[5]153] €01—01—2009—31—12—2099)

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp