← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #692550]: [2.0.4] Windows: OCR: Tesseract.doOCR() hangs after some hundred usages with an image not containing text, but some significant edges

 

Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

Description changed to:
************************************ bug tracked on GitHub

https://github.com/RaiMan/SikuliX1/issues/381

------------------------------------------------------------------------------------------------------------

Hi!

I am using Sikulix 2.0.4 on Windows 10 64bit, JAVA 11, 2 large sized
Monitors (3440x1440 + 2560x1440 as one display, NVIDIA).

Sikulix crashes (meaning: it does not process anymore, does not write
logfiles, ALT-SHIFT-C does not work, JAVA needs to be killed in
taskmanager to restart sikulix) within following function in about 1 of
10 cases. only when it tries to OCR read text in an area where there is
no text:

def text_shrink(Reg):  # continously decrease region until OCR gets a match
        texts=False
        Reg=Reg.grow(30,30,0,0) 
        while (texts==False or len(texts)<=2) and Reg.getW()>20:
            Reg=Reg.grow(-30,-30,0,0) 
            texts=ExtractAlphanumeric_all(Reg.text()).strip()    #crash here on OCR      
        return texts

The images for this particular run where the crash happend is attached.

Here the debug log (4):

[debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342
[debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded
[debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0
[debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [824,1291, 224x67]
[debug (19.08.20, 10:33:21)] Image: BufferedImage: (224, 67)
[debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__
[debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (224x67)
[debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342
[debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded
[debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0
[debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [854,1291, 164x67]
[debug (19.08.20, 10:33:21)] Image: BufferedImage: (164, 67)
[debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__
[debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (164x67)
[debug (19.08.20, 10:33:21)] RunTime:loadlib: trying opencv_java342
[debug (19.08.20, 10:33:21)] RunTime:loadLib: opencv_java342.dll already loaded
[debug (19.08.20, 10:33:21)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0
[debug (19.08.20, 10:33:21)] RobotDesktop: captureScreen: [884,1291, 104x67]
[debug (19.08.20, 10:33:21)] Image: BufferedImage: (104, 67)
[debug (19.08.20, 10:33:21)] Image: getImage inMemory: __BufferedImage__
[debug (19.08.20, 10:33:21)] Finder2: makeMat: INT_RGB (104x67)
[debug (19.08.20, 10:41:22)] IDE: AbortKey was pressed: aborting all running scripts
[debug (19.08.20, 10:41:31)] IDE: AbortKey was pressed: aborting all running scripts
[debug (19.08.20, 10:43:19)] IDE: AbortKey was pressed: aborting all running scripts
[debug (19.08.20, 10:43:20)] IDE: AbortKey was pressed: aborting all running scripts


Thanks a lot
Michael

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