logo
0 anonymous
Views: 1269071 Challenges: 342
Users: 12684 Online: 3

GOCR – 1 Posts

  • 10/16/2024 13:00
    moose's Avatar moose 00
    Not SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot SpecifiedNot Specified
    Does anyone know \"link\"GOCR (See also \"link\"manual)? At the moment, I'm making some strange experiences with it.

    I have written some python code which uses GOCR:
    p = Popen(\"gocr -C 0-9 -m 32 -a 100 MyImage.png\", stdout=PIPE, shell=True)
    while p.poll() is None:
        (stdout, stderr) = p.communicate()
        print stdout.strip()
    p = Popen(\"gocr -C 0-9 -m 32 -a 95 MyImage.png\", stdout=PIPE, shell=True)
    while p.poll() is None:
        (stdout, stderr) = p.communicate()
        print stdout.strip()
    p = Popen(\"gocr -C 0-9 -m 32 -a 90 MyImage.png\", stdout=PIPE, shell=True)
    while p.poll() is None:
        (stdout, stderr) = p.communicate()
        print stdout.strip()
    
    p = Popen(\"gocr -C 0-9 -m 32 -a 50 MyImage.png\", stdout=PIPE, shell=True)
    while p.poll() is None:
        (stdout, stderr) = p.communicate()
        print stdout.strip()
    
    p = Popen(\"gocr -C 0-9 -m 32 -a 5 MyImage.png\", stdout=PIPE, shell=True)
    while p.poll() is None:
        (stdout, stderr) = p.communicate()
        print stdout.strip()

    This gives the following output:
    ________6
    ___0____6
    ___0____6
    ___0____6
    ___0____6
    

    But directly after that, I execute this command:
    $ gocr -C 0-9 -m 162 -a 100 MyImage.png 
    166013476
    


    How is this possible? Does the \"extend database\"-modus make it smarter? I didn't extend the database in between...