The challenge is I have to take a screenshot every second and the BufferedImage is slowing my program considerably and stopping it with “full memory exception”.
I try to use the flush() method to flush the BufferedImage but I still get the same problem.
I now use SikuliXapi Version-2.0.5 for Windows. I use these methods “region.text()” and or “region.textLine()” and the slowing down of the program has improved considerably and it almost gone to the point that I decided to use Sikuli alone.
The challenge now is that the results I get from Sikuli are about 70 % and based on my program I need the results to be 100 % all the time.
Now my question is using Sikuli and looking at my below code, how can I add the "CHANGE IMAGE BACKGROUND AND TEXT" and "REMOVING STRIPES ON AN IMAGE" to my sikuli code so I can get the 100 % resuls? Is there a way to do this kind of modification in Sikuli?
MY CODE:
//METHOD START
private static void readValue() throws IOException, AWTException, InterruptedException {
Tesseract tessEndValue = new Tesseract();
tessEndValue.setDatapath("C:\\Tess4J\\tessdata");
tessEndValue.setTessVariable("user_defined_dpi", "300");
Rectangle regionEndValue = new Rectangle(150,180,200,300);
BufferedImage readEndValueimage = robot.createScreenCapture(regionEndValue);
Thank you!