Cannot make OCR work with 1.1.4
I am trying to validate whether Sikulix could be a tool used at work for testing UI (browser application) but I can not get the OCR functionality to work. When using 1.1.3 I can get the region.text() method to return the text from the selected region, but with 1.1.4 I get very arbitrary results - most often text() doesn't return anything and len(words) returns 0, but sometimes something is returned but definitely not the selected text.
What am I doing wrong here?
*** Simple program code from IDE ***
Settings.
Settings.
Settings.
Settings.
Settings.
Debug.on(5)
region=
Debug.user("Region: %s", region)
Debug.user("Text: %s", region.text())
#
# Below part fails with 1.1.3 as the functionality is new to 1.1.4
#
words=region.
Debug.user("Number of matched words: %d", len(words))
for matchWord in words:
Debug.
matchWord.
sleep(1)
sleep(5)
***** Corresponding output selecting "What is SikuliX text" from the sikulix.com page *****
[debug] RobotDesktop: captureScreen: [0,0, 2560x1440]
[debug] ScreenImage.store: C:\Users\
[debug] CapturePrompt: started at (986,950) as L(986,950) on 0
[debug] CapturePrompt: finished at (1687,1063) as L(1687,1063) on 0
[debug] CapturePrompt.
[user (16-09-19 21:44:30)] Region: R[986,950 702x114]@S(0)
[debug] RobotDesktop: captureScreen: [986,950, 702x114]
[debug] RunTime:
C:\Users\
[debug] RunTime:
[debug] RunTime:libsExport: folder exists: C:\Users\
[debug] RunTime:loadLib: opencv_java342.dll (success)
[debug] TextRecognizer: start: data folder: C:\Users\
[debug] TextRecognizer: start: language: eng
[user (16-09-19 21:44:32)] Text: :§§E§% g駧i
[debug] RobotDesktop: captureScreen: [986,950, 702x114]
[debug] Finder2: doFindText: listWords: 2 words (2455 msec)
[user (16-09-19 21:44:35)] Number of matched words: 2
[user (16-09-19 21:44:35)] Mathed word: :§§E§%
[debug] highlight M[986,1006 416x47]On(0) S 3501 for 0.0 secs
[user (16-09-19 21:44:36)] Mathed word: g駧i
[debug] highlight M[1276,1006 412x47]On(0) S 3679 for 0.0 secs
1.1.4-SNAPSHOT-
1.1.4-SNAPSHOT-
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Finn Andresen
- Solved:
- Last query:
- Last reply: