sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35225
Re: [Question #232900]: [1.0] [HowTo] turn on text recognition --- solution
Question #232900 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232900
Pranav posted a new comment:
Hello RaiMan,
Thank you for reply.
I am able to get it using Tess4j. But the data extracted is not 100%
accurate(Also some data is missing )
Is there any other way to get all data accurately.?
I have below code to extract text using Tess4j
-----------------------------------------------------------------------------------------------------------
File imageFile = new File( "MainScreen.png");
// Tesseract instance = Tesseract.getInstance(); // JNA Interface Mapping
Tesseract1 instance = new Tesseract1(); // JNA Direct Mapping
instance.setDatapath("F:\\TEST AUTOMATION\\LDTP_SIKULI\\SIKULI_LDTP_STUFF\\Tess4J-2.0-src\\Tess4J");
try {
String result = instance.doOCR(imageFile);
//instance.doOCR(new Buff)
System.out.println(result);
} catch (TesseractException e) {
System.err.println(e.getMessage());
}
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.