使用 java 时,Sikuli 中的文本识别 (OCR) 已关闭

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19966942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 21:54:20  来源:igfitidea点击:

text recognition (OCR) is switched off in Sikuli when using java

javaocrsikuli

提问by Christopher Lawless

Has anyone got the OCR function Region.text() working in Sikuli with java?

有没有人使用 Java 在 Sikuli 中使用 OCR 函数 Region.text() ?

I keep getting this as output

我一直把它作为输出

Region.text: text recognition is currently switched off

Region.text:文本识别目前已关闭

and I can't find anyway to turn this feature on in java.

无论如何我都找不到在java中打开这个功能。

回答by ivan25

Sikuli has Settings class (org.sikuli.basics.Settings) that has options:

Sikuli 有设置类 (org.sikuli.basics.Settings) 有选项:

Settings.OcrTextSearch

Settings.OcrTextSearch

Settings.OcrTextRead

Settings.OcrTextRead

Put them true and it should work :)

把它们设为真,它应该可以工作:)

P.S. Actually I don"t know why are they by default false...

PS 其实我不知道为什么他们默认是假的......

回答by kenorb

If you're using Sikulix IDE app for 1.1.x, go to Preferences, more options..., you should enable allow OCR.

如果您使用的是 1.1.x 版的 Sikulix IDE 应用程序,请转到Preferences, more options...,您应该启用允许 OCR。

Sikulix IDE app for 1.1.x, Preferences, options, allow OCR

适用于 1.1.x、首选项、选项、允许 OCR 的 Sikulix IDE 应用程序